This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
line_separator_chars
- To: Nick Clifton <nickc at cygnus dot com>
- Subject: line_separator_chars
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Wed, 7 Jun 2000 16:55:13 +1000 (EST)
- cc: binutils at sourceware dot cygnus dot com
This patch removes `;' as a default line separator char. All back-ends
now explicitly include a semicolon in their line_separator_chars string,
except for those that use `;' as a comment char.
The idea here is to make the preprocessor treatment of line separator
chars consistent with other code that uses is_end_of_line - not that there
was really anything buggy about the previous treatment because as
H.J. pointed out, when `;' wasn't a valid line separator it was a comment
char and so was stripped out.
gas/ChangeLog
* app.c (do_scrub_begin): Don't default lex[';'] as a line
separator.
* doc/internals.texi (line_separator_chars): Semicolon is no
longer a default. Mention null and newline as defaults.
* read.c (is_end_of_line): Remove ifdef TC_HPPA, and don't set `;'
entry.
* config/tc-i386.h (line_separator_chars): Explicitly include `;'
* config/tc-i860.h (line_separator_chars): Likewise.
* config/tc-h8300.c (line_separator_chars): Likewise.
* config/tc-i960.c (line_separator_chars): Likewise.
* config/tc-m68k.c (line_separator_chars): Likewise.
* config/tc-mips.c (line_separator_chars): Likewise.
* config/tc-ns32k.c (line_separator_chars): Likewise.
* config/tc-sparc.c (line_separator_chars): Likewise.
* config/tc-vax.c (line_separator_chars): Likewise.
* config/tc-h8300.c (comment_chars): Use string initialiser.
* config/tc-i960.c (line_comment_chars): Likewise.
* config/tc-z8k.c (comment_chars, line_comment_chars,
line_separator_chars): Likewise.
* config/tc-arm.c (line_separator_chars): Always use `;', not just
for TE_LINUX.
--
Linuxcare. Support for the Revolution.
Index: gas/app.c
===================================================================
RCS file: /cvs/src/src/gas/app.c,v
retrieving revision 1.9
diff -u -p -r1.9 app.c
--- app.c 2000/04/21 20:22:22 1.9
+++ app.c 2000/06/07 04:25:09
@@ -101,7 +101,6 @@ do_scrub_begin (m68k_mri)
lex['\t'] = LEX_IS_WHITESPACE;
lex['\r'] = LEX_IS_WHITESPACE;
lex['\n'] = LEX_IS_NEWLINE;
- lex[';'] = LEX_IS_LINE_SEPARATOR;
lex[':'] = LEX_IS_COLON;
#ifdef TC_M68K
Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.23
diff -u -p -r1.23 read.c
--- read.c 2000/06/04 05:03:31 1.23
+++ read.c 2000/06/07 04:25:50
@@ -155,11 +155,7 @@ char is_end_of_line[256] =
#endif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* _!"#$%&'()*+,-./ */
-#ifdef TC_HPPA
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0123456789:;<=>? */
-#else
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, /* 0123456789:;<=>? */
-#endif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.45
diff -u -p -r1.45 tc-arm.c
--- tc-arm.c 2000/06/02 02:52:10 1.45
+++ tc-arm.c 2000/06/07 04:26:39
@@ -115,11 +115,7 @@ CONST char comment_chars[] = "@";
/* Also note that comments like this one will always work. */
CONST char line_comment_chars[] = "#";
-#ifdef TE_LINUX
CONST char line_separator_chars[] = ";";
-#else
-CONST char line_separator_chars[] = "";
-#endif
/* Chars that can be used to separate mant
from exp in floating point numbers. */
Index: gas/config/tc-h8300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-h8300.c,v
retrieving revision 1.3
diff -u -p -r1.3 tc-h8300.c
--- tc-h8300.c 2000/05/14 11:48:42 1.3
+++ tc-h8300.c 2000/06/07 04:26:48
@@ -34,11 +34,9 @@
#include "opcode/h8300.h"
#include <ctype.h>
-const char comment_chars[] =
-{';', 0};
-const char line_separator_chars[] =
-{0};
+const char comment_chars[] = ";";
const char line_comment_chars[] = "#";
+const char line_separator_chars[] = "";
/* This table describes all the machine specific pseudo-ops the assembler
has to support. The fields are:
Index: gas/config/tc-i386.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i386.c,v
retrieving revision 1.52
diff -u -p -r1.52 tc-i386.c
--- tc-i386.c 2000/06/03 13:06:33 1.52
+++ tc-i386.c 2000/06/07 04:27:17
@@ -169,7 +169,7 @@ const char line_comment_chars[] = "";
const char line_comment_chars[] = "/";
#endif
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
Index: gas/config/tc-i860.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i860.c,v
retrieving revision 1.2
diff -u -p -r1.2 tc-i860.c
--- tc-i860.c 1999/06/22 14:52:55 1.2
+++ tc-i860.c 2000/06/07 04:27:20
@@ -66,7 +66,7 @@ const char comment_chars[] = "!/"; /* JF
/* Also note that comments like this one will always work. */
const char line_comment_chars[] = "#/";
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
Index: gas/config/tc-i960.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i960.c,v
retrieving revision 1.4
diff -u -p -r1.4 tc-i960.c
--- tc-i960.c 1999/06/11 19:03:06 1.4
+++ tc-i960.c 2000/06/07 04:27:46
@@ -180,9 +180,9 @@ const char comment_chars[] = "#";
/* Also note that comments started like this one will always work. */
-const char line_comment_chars[1];
+const char line_comment_chars[] = "";
-const char line_separator_chars[1];
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
Index: gas/config/tc-m68k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68k.c,v
retrieving revision 1.6
diff -u -p -r1.6 tc-m68k.c
--- tc-m68k.c 2000/05/08 10:24:06 1.6
+++ tc-m68k.c 2000/06/07 04:28:23
@@ -50,7 +50,7 @@ const char *m68k_comment_chars = "|";
/* Also note that comments like this one will always work. */
const char line_comment_chars[] = "#*";
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
CONST char EXP_CHARS[] = "eE";
Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.16
diff -u -p -r1.16 tc-mips.c
--- tc-mips.c 2000/05/29 22:05:27 1.16
+++ tc-mips.c 2000/06/07 04:29:48
@@ -357,7 +357,7 @@ const char comment_chars[] = "#";
const char line_comment_chars[] = "#";
/* This array holds machine specific line separator characters. */
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
Index: gas/config/tc-ns32k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ns32k.c,v
retrieving revision 1.3
diff -u -p -r1.3 tc-ns32k.c
--- tc-ns32k.c 1999/06/22 14:52:58 1.3
+++ tc-ns32k.c 2000/06/07 04:30:03
@@ -62,7 +62,7 @@
const char comment_chars[] = "#";
const char line_comment_chars[] = LINE_COMMENT_CHARS;
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
#if !defined(ABSOLUTE_PREFIX) && !defined(IMMEDIATE_PREFIX)
#define ABSOLUTE_PREFIX '@' /* One or the other MUST be defined */
#endif
Index: gas/config/tc-sparc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sparc.c,v
retrieving revision 1.16
diff -u -p -r1.16 tc-sparc.c
--- tc-sparc.c 2000/05/26 06:45:55 1.16
+++ tc-sparc.c 2000/06/07 04:30:31
@@ -175,7 +175,7 @@ const char comment_chars[] = "!"; /* JF
work if '/' isn't otherwise defined. */
const char line_comment_chars[] = "#";
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
Index: gas/config/tc-vax.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-vax.c,v
retrieving revision 1.2
diff -u -p -r1.2 tc-vax.c
--- tc-vax.c 1999/06/03 00:29:46 1.2
+++ tc-vax.c 2000/06/07 04:30:50
@@ -32,7 +32,7 @@ const char comment_chars[] = "#";
/* Note that for the VAX the are the same as comment_chars above. */
const char line_comment_chars[] = "#";
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
Index: gas/config/tc-z8k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-z8k.c,v
retrieving revision 1.2
diff -u -p -r1.2 tc-z8k.c
--- tc-z8k.c 1999/06/03 00:29:48 1.2
+++ tc-z8k.c 2000/06/07 04:30:57
@@ -31,12 +31,9 @@
#include "bfd.h"
#include <ctype.h>
-const char comment_chars[] =
-{'!', 0};
-const char line_separator_chars[] =
-{';', 0};
-const char line_comment_chars[] =
-{'#', 0};
+const char comment_chars[] = "!";
+const char line_comment_chars[] = "#";
+const char line_separator_chars[] = ";";
extern int machine;
extern int coff_flags;
Index: gas/doc/internals.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/internals.texi,v
retrieving revision 1.12
diff -u -p -r1.12 internals.texi
--- internals.texi 2000/05/29 19:56:44 1.12
+++ internals.texi 2000/06/07 04:31:12
@@ -912,7 +912,7 @@ comment when they appear at the start of
@item line_separator_chars
@cindex line_separator_chars
This is a null terminated @code{const char} array of characters which separate
-lines (semicolon and newline are such characters by default, and need not be
+lines (null and newline are such characters by default, and need not be
listed in this array). Note that line_separator_chars do not separate lines
if found in a comment, such as after a character in line_comment_chars or
comment_chars.