Commit 3dc8d169 by Kaveh R. Ghazi Committed by Kaveh Ghazi

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
parent 0bd18788
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> Thu Jul 27 09:25:17 2000 Akiko Matsushita <matusita@sra.co.jp>
* pa/x-pa-hpux: Add -D_HIUX_SOURCE to FIXPROTO_DEFINES * pa/x-pa-hpux: Add -D_HIUX_SOURCE to FIXPROTO_DEFINES
......
...@@ -733,10 +733,21 @@ end ifobjc ...@@ -733,10 +733,21 @@ end ifobjc
string: string:
STRING STRING
| string STRING | string STRING
{ $$ = chainon ($1, $2); {
ifc
static int last_lineno = 0;
static const char *last_input_filename = 0;
end ifc
$$ = chainon ($1, $2);
ifc ifc
if (warn_traditional && !in_system_header) if (warn_traditional && !in_system_header
warning ("Use of ANSI string concatenation"); && (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 end ifc
} }
; ;
......
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