summaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-22 17:59:46 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-22 17:59:46 +0000
commitf2e399cf88701324f052dad8f37a39cd5a27e5f2 (patch)
treea67b3674ad3b4081215f47f5030ffa8a78b0a260 /gcc/c-lex.c
parent5e37743f0618f850794f275e10ed3648ad7a7a57 (diff)
downloadgcc-f2e399cf88701324f052dad8f37a39cd5a27e5f2.tar.gz
* c-lex.c (skip_white_space): Just treat CRs as horizontal whitespace.
* dbxout.c (dbxout_symbol_name): Just use DECL_NAME for function-local names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36570 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index b1f555b8e6e..f6dee4d5867 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -310,8 +310,9 @@ skip_white_space (c)
{
switch (c)
{
- /* There is no need to process comments, backslash-newline,
- or \r here. None can occur in the output of cpp. */
+ /* There is no need to process comments or backslash-newline
+ here. None can occur in the output of cpp. Do handle \r
+ in case someone sent us a .i file. */
case '\n':
if (linemode)
@@ -322,12 +323,13 @@ skip_white_space (c)
c = check_newline ();
break;
+ case '\r':
/* Per C99, horizontal whitespace is just these four characters. */
case ' ':
case '\t':
case '\f':
case '\v':
- c = getch ();
+ c = getch ();
break;
case '\\':
@@ -1503,9 +1505,10 @@ c_lex (value)
case '\t':
case '\f':
case '\v':
- c = getch ();
+ c = getch ();
break;
+ case '\r':
case '\n':
c = skip_white_space (c);
default: