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:
Kaveh R. Ghazi 2000-07-27 15:35:32 +00:00 committed by Kaveh Ghazi
parent 0bd1878833
commit 3dc8d16901
2 changed files with 19 additions and 3 deletions

View File

@ -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

View File

@ -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
}
;