diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c44d716ebda..d3203cce324 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,10 +1,17 @@ +2000-09-22 Jason Merrill + + * 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. + 2000-09-22 Brad Lucier Mark Mitchell * toplev.c (warn_disabled_optimization): Declare new warning flag. * flags.h (warn_disabled_optimization): Add it here. * gcse.c (gcse_main): Add warning when disabled. - * invoke.texi: Document -Wdisabled-optimization + * invoke.texi: Document -Wdisabled-optimization. 2000-09-21 Jason Merrill 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: diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 1be2025779d..71c795964c9 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2215,11 +2215,19 @@ dbxout_symbol_name (decl, suffix, letter) const char *suffix; int letter; { - /* One slight hitch: if this is a VAR_DECL which is a static - class member, we must put out the mangled name instead of the - DECL_NAME. Note also that static member (variable) names DO NOT begin - with underscores in .stabs directives. */ - const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); + const char *name; + + if (TYPE_P (DECL_CONTEXT (decl))) + /* One slight hitch: if this is a VAR_DECL which is a static + class member, we must put out the mangled name instead of the + DECL_NAME. Note also that static member (variable) names DO NOT begin + with underscores in .stabs directives. */ + name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); + else + /* ...but if we're function-local, we don't want to include the junk + added by ASM_FORMAT_PRIVATE_NAME. */ + name = IDENTIFIER_POINTER (DECL_NAME (decl)); + if (name == 0) name = "(anon)"; fprintf (asmfile, "%s \"%s%s:", ASM_STABS_OP, name,