Commit a3a834aa by Jason Merrill

c-lex.c (skip_white_space): Just treat CRs as horizontal whitespace.

        * 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.

From-SVN: r36570
parent 49895d55
2000-09-22 Jason Merrill <jason@redhat.com>
* 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 <lucier@math.purdue.edu> 2000-09-22 Brad Lucier <lucier@math.purdue.edu>
Mark Mitchell <mark@codesourcery.com> Mark Mitchell <mark@codesourcery.com>
* toplev.c (warn_disabled_optimization): Declare new warning flag. * toplev.c (warn_disabled_optimization): Declare new warning flag.
* flags.h (warn_disabled_optimization): Add it here. * flags.h (warn_disabled_optimization): Add it here.
* gcse.c (gcse_main): Add warning when disabled. * gcse.c (gcse_main): Add warning when disabled.
* invoke.texi: Document -Wdisabled-optimization * invoke.texi: Document -Wdisabled-optimization.
2000-09-21 Jason Merrill <jason@redhat.com> 2000-09-21 Jason Merrill <jason@redhat.com>
......
...@@ -310,8 +310,9 @@ skip_white_space (c) ...@@ -310,8 +310,9 @@ skip_white_space (c)
{ {
switch (c) switch (c)
{ {
/* There is no need to process comments, backslash-newline, /* There is no need to process comments or backslash-newline
or \r here. None can occur in the output of cpp. */ here. None can occur in the output of cpp. Do handle \r
in case someone sent us a .i file. */
case '\n': case '\n':
if (linemode) if (linemode)
...@@ -322,12 +323,13 @@ skip_white_space (c) ...@@ -322,12 +323,13 @@ skip_white_space (c)
c = check_newline (); c = check_newline ();
break; break;
case '\r':
/* Per C99, horizontal whitespace is just these four characters. */ /* Per C99, horizontal whitespace is just these four characters. */
case ' ': case ' ':
case '\t': case '\t':
case '\f': case '\f':
case '\v': case '\v':
c = getch (); c = getch ();
break; break;
case '\\': case '\\':
...@@ -1503,9 +1505,10 @@ c_lex (value) ...@@ -1503,9 +1505,10 @@ c_lex (value)
case '\t': case '\t':
case '\f': case '\f':
case '\v': case '\v':
c = getch (); c = getch ();
break; break;
case '\r':
case '\n': case '\n':
c = skip_white_space (c); c = skip_white_space (c);
default: default:
......
...@@ -2215,11 +2215,19 @@ dbxout_symbol_name (decl, suffix, letter) ...@@ -2215,11 +2215,19 @@ dbxout_symbol_name (decl, suffix, letter)
const char *suffix; const char *suffix;
int letter; int letter;
{ {
/* One slight hitch: if this is a VAR_DECL which is a static const char *name;
class member, we must put out the mangled name instead of the
DECL_NAME. Note also that static member (variable) names DO NOT begin if (TYPE_P (DECL_CONTEXT (decl)))
with underscores in .stabs directives. */ /* One slight hitch: if this is a VAR_DECL which is a static
const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); 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) if (name == 0)
name = "(anon)"; name = "(anon)";
fprintf (asmfile, "%s \"%s%s:", ASM_STABS_OP, name, fprintf (asmfile, "%s \"%s%s:", ASM_STABS_OP, name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment