mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 12:23:59 +08:00
c-parse.in (string): For -Wtraditional, warn about string concatenation only once per line.
* c-parse.in (string): For -Wtraditional, warn about string concatenation only once per line. From-SVN: r35290
This commit is contained in:
parent
0bd1878833
commit
3dc8d16901
@ -1,3 +1,8 @@
|
||||
2000-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* c-parse.in (string): For -Wtraditional, warn about string
|
||||
concatenation only once per line.
|
||||
|
||||
Thu Jul 27 09:25:17 2000 Akiko Matsushita <matusita@sra.co.jp>
|
||||
|
||||
* pa/x-pa-hpux: Add -D_HIUX_SOURCE to FIXPROTO_DEFINES
|
||||
|
@ -733,10 +733,21 @@ end ifobjc
|
||||
string:
|
||||
STRING
|
||||
| string STRING
|
||||
{ $$ = chainon ($1, $2);
|
||||
{
|
||||
ifc
|
||||
if (warn_traditional && !in_system_header)
|
||||
warning ("Use of ANSI string concatenation");
|
||||
static int last_lineno = 0;
|
||||
static const char *last_input_filename = 0;
|
||||
end ifc
|
||||
$$ = chainon ($1, $2);
|
||||
ifc
|
||||
if (warn_traditional && !in_system_header
|
||||
&& (lineno != last_lineno || !last_input_filename ||
|
||||
strcmp (last_input_filename, input_filename)))
|
||||
{
|
||||
warning ("traditional C rejects string concatenation");
|
||||
last_lineno = lineno;
|
||||
last_input_filename = input_filename;
|
||||
}
|
||||
end ifc
|
||||
}
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user