diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2000-08-29 17:34:26 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2000-08-29 17:34:26 +0000 |
commit | 6ad79f1b8b9d061fb3d81b6f950f7115d644f0b6 (patch) | |
tree | 2c1ecb13722eae486296a2d1dc7dd617f60201d2 /gcc/c-decl.c | |
parent | c00f0fb22b193ad055fc552a9213bd5c1b48f032 (diff) | |
download | gcc-6ad79f1b8b9d061fb3d81b6f950f7115d644f0b6.zip gcc-6ad79f1b8b9d061fb3d81b6f950f7115d644f0b6.tar.gz gcc-6ad79f1b8b9d061fb3d81b6f950f7115d644f0b6.tar.bz2 |
c-decl.c (define_label): Call warning_with_file_and_line and error_with_file_and_line instead of plain...
* c-decl.c (define_label): Call warning_with_file_and_line and
error_with_file_and_line instead of plain warning or error.
* c-parse.in (label): Use save_filename/save_lineno to ensure
correct values for calls to define_label.
From-SVN: r36040
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 5404a4f..545ac88 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2747,12 +2747,14 @@ define_label (filename, line, name) } if (warn_traditional && !in_system_header && lookup_name (name)) - warning ("traditional C lacks a separate namespace for labels, identifier `%s' conflicts", - IDENTIFIER_POINTER (name)); + warning_with_file_and_line (filename, line, + "traditional C lacks a separate namespace for labels, identifier `%s' conflicts", + IDENTIFIER_POINTER (name)); if (DECL_INITIAL (decl) != 0) { - error ("duplicate label `%s'", IDENTIFIER_POINTER (name)); + error_with_file_and_line (filename, line, "duplicate label `%s'", + IDENTIFIER_POINTER (name)); return 0; } else |