+2000-08-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * c-decl.c (duplicate_decls, define_label): Restrict -Wtraditional
+ warnings to user code.
+
+ * c-lex.c (readescape, yylex): Likewise.
+
+ * c-typeck.c (store_init_value, process_init_element): Likewise
+ (c_expand_start_case): Format.
+
2000-08-18 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* mips/linux.h (LINK_SPEC): Use %(endian_spec).
/* If warn_traditional, warn when a non-static function
declaration follows a static one. */
- if (warn_traditional
+ if (warn_traditional && !in_system_header
&& TREE_CODE (olddecl) == FUNCTION_DECL
&& !TREE_PUBLIC (olddecl)
&& TREE_PUBLIC (newdecl))
decl = lookup_label (name);
}
- if (warn_traditional && lookup_name (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));
switch (c)
{
case 'x':
- if (warn_traditional)
+ if (warn_traditional && !in_system_header)
warning ("the meaning of `\\x' varies with -traditional");
if (flag_traditional)
return TARGET_BS;
case 'a':
- if (warn_traditional)
+ if (warn_traditional && !in_system_header)
warning ("the meaning of `\\a' varies with -traditional");
if (flag_traditional)
/* We assume that constants specified in a non-decimal
base are bit patterns, and that the programmer really
meant what they wrote. */
- if (warn_traditional && base == 10
+ if (warn_traditional && !in_system_header && base == 10
&& traditional_type != ansi_type)
{
if (TYPE_PRECISION (traditional_type)
}
#endif
- if (warn_traditional
+ if (warn_traditional && !in_system_header
&& AGGREGATE_TYPE_P (TREE_TYPE (decl)) && ! TREE_STATIC (decl))
warning ("traditional C rejects automatic aggregate initialization");
code appears conditioned on e.g. __STDC__ to avoid
"missing initializer" warnings and relies on default
initialization to zero in the traditional C case. */
- if (warn_traditional && !integer_zerop (value))
+ if (warn_traditional && !in_system_header && !integer_zerop (value))
warning ("traditional C rejects initialization of unions");
/* Accept a string constant to initialize a subarray. */
tree index;
type = TYPE_MAIN_VARIANT (TREE_TYPE (exp));
- if (warn_traditional
- && ! in_system_header
+ if (warn_traditional && !in_system_header
&& (type == long_integer_type_node
|| type == long_unsigned_type_node))
warning ("`long' switch expression not converted to `int' in ISO C");