* c-parse.in (string): For -Wtraditional, warn about string
concatenation only once per line.
From-SVN: r35290
+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
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
- if (warn_traditional && !in_system_header)
- warning ("Use of ANSI string concatenation");
+ 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
}
;