* gas/i386/float.s, gas/i386/float.l: Modify to work correctly
[deliverable/binutils-gdb.git] / gas / read.c
index 7859fe146eb64f8a4ca595873b8fd76bb13739ed..886c028fdb395bc2c9f8b53dfd602a9b0184ef47 100644 (file)
@@ -89,6 +89,10 @@ die horribly;
 #define LEX_QM 0
 #endif
 
+#ifndef LEX_HASH
+#define LEX_HASH 0
+#endif
+
 #ifndef LEX_DOLLAR
 /* The a29k assembler does not permits labels to start with $.  */
 #define LEX_DOLLAR 3
@@ -104,7 +108,7 @@ char lex_type[256] =
 {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,      /* @ABCDEFGHIJKLMNO */
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,      /* PQRSTUVWXYZ[\]^_ */
-  0, 0, 0, 0, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */
+  0, 0, 0, LEX_HASH, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */
   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, LEX_QM, /* 0123456789:;<=>? */
   LEX_AT, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* @ABCDEFGHIJKLMNO */
   3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, 0, 3, /* PQRSTUVWXYZ[\]^_ */
@@ -415,7 +419,7 @@ static const pseudo_typeS potable[] =
   {"xstabs", s_xstab, 's'},
   {"word", cons, 2},
   {"zero", s_space, 0},
-  {NULL                      /* end sentinel */
+  {NULL, NULL, 0}                      /* end sentinel */
 };
 
 static int pop_override_ok = 0;
@@ -826,6 +830,9 @@ read_a_source_file (name)
                  else
                    {
                      int inquote = 0;
+#ifdef QUOTES_IN_INSN
+                     int inescape = 0;
+#endif
 
                      /* WARNING: c has char, which may be end-of-line. */
                      /* Also: input_line_pointer->`\0` where c was. */
@@ -839,6 +846,14 @@ read_a_source_file (name)
                        {
                          if (flag_m68k_mri && *input_line_pointer == '\'')
                            inquote = ! inquote;
+#ifdef QUOTES_IN_INSN
+                         if (inescape)
+                           inescape = 0;
+                         else if (*input_line_pointer == '"')
+                           inquote = ! inquote;
+                         else if (*input_line_pointer == '\\')
+                           inescape = 1;
+#endif
                          input_line_pointer++;
                        }
 
@@ -1132,7 +1147,7 @@ mri_comment_end (stop, stopc)
 
 void 
 s_abort (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   as_fatal (_(".abort detected.  Abandoning ship."));
 }
@@ -1158,21 +1173,7 @@ do_align (n, fill, len, max)
 
   if (fill == NULL)
     {
-      int maybe_text;
-
-#ifdef BFD_ASSEMBLER
-      if ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
-       maybe_text = 1;
-      else
-       maybe_text = 0;
-#else
-      if (now_seg != data_section && now_seg != bss_section)
-       maybe_text = 1;
-      else
-       maybe_text = 0;
-#endif
-
-      if (maybe_text)
+      if (subseg_text_p (now_seg))
        default_fill = NOP_OPCODE;
       else
        default_fill = 0;
@@ -1336,7 +1337,7 @@ s_align_ptwo (arg)
 
 void 
 s_comm (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   register char *name;
   register char c;
@@ -1418,7 +1419,7 @@ s_comm (ignore)
 
 void
 s_mri_common (small)
-     int small;
+     int small ATTRIBUTE_UNUSED;
 {
   char *name;
   char c;
@@ -1517,7 +1518,7 @@ s_mri_common (small)
 
 void
 s_data (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   segT section;
   register int temp;
@@ -1591,7 +1592,7 @@ s_app_file (appfile)
 
 void
 s_app_line (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   int l;
 
@@ -1617,7 +1618,7 @@ s_app_line (ignore)
 
 void
 s_end (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   if (flag_mri)
     {
@@ -1635,7 +1636,7 @@ s_end (ignore)
 
 void
 s_err (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   as_bad (_(".err encountered"));
   demand_empty_rest_of_line ();
@@ -1645,7 +1646,7 @@ s_err (ignore)
 
 void
 s_fail (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   offsetT temp;
   char *stop = NULL;
@@ -1668,7 +1669,7 @@ s_fail (ignore)
 
 void 
 s_fill (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   expressionS rep_exp;
   long size = 1;
@@ -1765,7 +1766,7 @@ s_fill (ignore)
 
 void 
 s_globl (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   char *name;
   int c;
@@ -1781,9 +1782,11 @@ s_globl (ignore)
       name = input_line_pointer;
       c = get_symbol_end ();
       symbolP = symbol_find_or_make (name);
+      S_SET_EXTERNAL (symbolP);
+
       *input_line_pointer = c;
       SKIP_WHITESPACE ();
-      S_SET_EXTERNAL (symbolP);
+      c = *input_line_pointer;
       if (c == ',')
        {
          input_line_pointer++;
@@ -1838,7 +1841,7 @@ s_irp (irpc)
 
 void
 s_linkonce (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   enum linkonce_type type;
 
@@ -2116,7 +2119,7 @@ void s_lcomm_bytes (needs_align)
 
 void 
 s_lsym (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   register char *name;
   register char c;
@@ -2238,7 +2241,7 @@ get_line_sb (line)
 
 void
 s_macro (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   char *file;
   unsigned int line;
@@ -2290,7 +2293,7 @@ s_macro (ignore)
 
 void
 s_mexit (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   cond_exit_macro (macro_nest);
   buffer_limit = input_scrub_next_buffer (&input_line_pointer);
@@ -2300,7 +2303,7 @@ s_mexit (ignore)
 
 void
 s_mri (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   int on, old_flag;
 
@@ -2368,7 +2371,7 @@ do_org (segment, exp, fill)
 
 void 
 s_org (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   register segT segment;
   expressionS exp;
@@ -2424,7 +2427,7 @@ s_org (ignore)
 
 void
 s_mri_sect (type)
-     char *type;
+     char *type ATTRIBUTE_UNUSED;
 {
 #ifdef TC_M68K
 
@@ -2588,7 +2591,7 @@ s_mri_sect (type)
 
 void
 s_print (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   char *s;
   int len;
@@ -2602,7 +2605,7 @@ s_print (ignore)
 
 void
 s_purgem (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   if (is_it_end_of_statement ())
     {
@@ -2632,7 +2635,7 @@ s_purgem (ignore)
 
 void
 s_rept (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   int count;
   sb one;
@@ -3004,7 +3007,7 @@ s_float_space (float_type)
 
 void
 s_struct (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   char *stop = NULL;
   char stopc;
@@ -3020,7 +3023,7 @@ s_struct (ignore)
 
 void
 s_text (ignore)
-     int ignore;
+     int ignore ATTRIBUTE_UNUSED;
 {
   register int temp;
 
@@ -4405,7 +4408,7 @@ s_leb128 (sign)
 /*
  *                     stringer()
  *
- * We read 0 or more ',' seperated, double-quoted strings.
+ * We read 0 or more ',' separated, double-quoted strings.
  *
  * Caller should have checked need_pass_2 is FALSE because we don't check it.
  */
@@ -4829,7 +4832,7 @@ equals (sym_name, reassign)
 /* ARGSUSED */
 void 
 s_include (arg)
-     int arg;
+     int arg ATTRIBUTE_UNUSED;
 {
   char *newbuf;
   char *filename;
@@ -5051,7 +5054,7 @@ do_s_func (end_p, default_prefix)
 \f
 void 
 s_ignore (arg)
-     int arg;
+     int arg ATTRIBUTE_UNUSED;
 {
   while (!is_end_of_line[(unsigned char) *input_line_pointer])
     {
This page took 0.027703 seconds and 4 git commands to generate.