cleanup FLT_CHARS and EXP_CHARS
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Sat, 2 Apr 2016 20:38:40 +0000 (16:38 -0400)
committerTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Sun, 3 Apr 2016 23:50:02 +0000 (19:50 -0400)
Providing declarations in tc.h points out that alpha wasn't properly marking
FLT_CHARS as const.  We can also get rid of the confusing redefinition of
X_CHARS to mmix_x_chars.  Finally we can get rid of some now redundant
declarations of these constants.

gas/ChangeLog:

2016-04-03  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-alpha.c: Const qualify FLT_CHARS.
* config/atof-ieee.c: Remove declarations of FLT_CHARS and EXP_CHARS.
* config/tc-cris.h: Likewise.
* expr.c: Likewise.
* config/tc-mmix.c (md_atof): Adjust comment.
* config/tc-mmix.h: Stop defining FLT_CHARS and EXP_CHARS as macros.
* tc.h: Declare FLT_CHARS and EXP_CHARS.

gas/ChangeLog
gas/config/atof-ieee.c
gas/config/tc-alpha.c
gas/config/tc-cris.h
gas/config/tc-mmix.c
gas/config/tc-mmix.h
gas/expr.c
gas/tc.h

index 6560bac130888a5bc7518718887192e30bad5416..4c9ab5281d96cfe753689914a6cf9ca54c5a3ccc 100644 (file)
@@ -1,3 +1,13 @@
+2016-04-03  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+       * config/tc-alpha.c: Const qualify FLT_CHARS.
+       * config/atof-ieee.c: Remove declarations of FLT_CHARS and EXP_CHARS.
+       * config/tc-cris.h: Likewise.
+       * expr.c: Likewise.
+       * config/tc-mmix.c (md_atof): Adjust comment.
+       * config/tc-mmix.h: Stop defining FLT_CHARS and EXP_CHARS as macros.
+       * tc.h: Declare FLT_CHARS and EXP_CHARS.
+
 2016-04-03  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
 
        * config/tc-score.c (s3_gen_reloc): Add const qualifiers.
index 636549e03840163d4d6db5a5c1049bd1debf7858..443d28c2c4f8b0fbce4e0858b715593c1cbf3975 100644 (file)
@@ -23,7 +23,6 @@
 /* Flonums returned here.  */
 extern FLONUM_TYPE generic_floating_point_number;
 
-extern const char EXP_CHARS[];
 /* Precision in LittleNums.  */
 /* Don't count the gap in the m68k extended precision format.  */
 #define MAX_PRECISION  5
@@ -696,7 +695,6 @@ print_gen (gen)
 }
 #endif
 
-extern const char FLT_CHARS[];
 #define MAX_LITTLENUMS 6
 
 /* This is a utility function called from various tc-*.c files.  It
index 5fe9cb69dda9e7cf30b0d6111f3986b3974fb452..89eaf88603da7a3ce3fab869b201384c80e1ea9d 100644 (file)
@@ -241,7 +241,7 @@ const char EXP_CHARS[] = "eE";
 /* Characters which mean that a number is a floating point constant,
    as in 0d1.0.  */
 /* XXX: Do all of these really get used on the alpha??  */
-char FLT_CHARS[] = "rRsSfFdDxXpP";
+const char FLT_CHARS[] = "rRsSfFdDxXpP";
 
 #ifdef OBJ_EVAX
 const char *md_shortopts = "Fm:g+1h:HG:";
index 8a500311061e0facf186ed94ae1614075350c72b..ce16e97c521c5b10531c7edaef6a0f8851644d6e 100644 (file)
@@ -54,8 +54,6 @@ extern const pseudo_typeS md_pseudo_table[];
 extern const char cris_comment_chars[];
 extern const char line_comment_chars[];
 extern const char line_separator_chars[];
-extern const char EXP_CHARS[];
-extern const char FLT_CHARS[];
 
 /* This should be optional, since it is ignored as an escape (assumed to
    be itself) if it is not recognized.  */
index 2400a0b492b4fb18cd6a7f09e467c5b20fe1b8e7..d6992b480878fb683e3524e6eb9511ede71f725b 100644 (file)
@@ -395,9 +395,9 @@ const char line_comment_chars[] = "*#";
 
 const char line_separator_chars[] = ";";
 
-const char mmix_exp_chars[] = "eE";
+const char EXP_CHARS[] = "eE";
 
-const char mmix_flt_chars[] = "rf";
+const char FLT_CHARS[] = "rf";
 
 
 /* Fill in the offset-related part of GETA or Bcc.  */
@@ -2277,7 +2277,7 @@ md_atof (int type, char *litP, int *sizeP)
 {
   if (type == 'r')
     type = 'f';
-  /* FIXME: Having 'f' in mmix_flt_chars (and here) makes it
+  /* FIXME: Having 'f' in FLT_CHARS (and here) makes it
      problematic to also have a forward reference in an expression.
      The testsuite wants it, and it's customary.
      We'll deal with the real problems when they come; we share the
index b03ac8c8075a9eb12e92629115f0d7aba78b8b85..a4b1acafac69e9619efe9bba4192d9d83ff80a11 100644 (file)
@@ -32,12 +32,6 @@ extern const char mmix_comment_chars[];
 extern const char mmix_symbol_chars[];
 #define tc_symbol_chars mmix_symbol_chars
 
-extern const char mmix_exp_chars[];
-#define EXP_CHARS mmix_exp_chars
-
-extern const char mmix_flt_chars[];
-#define FLT_CHARS mmix_flt_chars
-
 /* "@" is a synonym for ".".  */
 #define LEX_AT (LEX_BEGIN_NAME)
 
index 777504f1f8004821f6f19f584b603ea66850b655..ddf0bc26f602016087c2ae4943b7dea04427e2e0 100644 (file)
@@ -46,8 +46,6 @@ static void clean_up_expression (expressionS * expressionP);
 static segT operand (expressionS *, enum expr_mode);
 static operatorT operatorf (int *);
 
-extern const char EXP_CHARS[], FLT_CHARS[];
-
 /* We keep a mapping of expression symbols to file positions, so that
    we can provide better error messages.  */
 
index 51ff4997edba0de24a4195c707a8db9135343378..60286e8e334c5d8f2cb0d51080b2d8765a49ab79 100644 (file)
--- a/gas/tc.h
+++ b/gas/tc.h
@@ -75,3 +75,6 @@ extern arelent *tc_gen_reloc (asection *, fixS *);
 #else
 extern arelent **tc_gen_reloc (asection *, fixS *);
 #endif
+
+extern const char FLT_CHARS[];
+extern const char EXP_CHARS[];
This page took 0.034193 seconds and 4 git commands to generate.