diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2000-01-25 18:29:02 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2000-01-25 18:29:02 +0000 |
commit | 2884c41e1c9d2abd8dd3db430d26fb56b7de6ea1 (patch) | |
tree | 1a4a974cd0413f12b6184b71c09453d5d010ca6a /gcc/java/parse.h | |
parent | 8c135f8458c75189290ee4e98b66e51cac737fb2 (diff) | |
download | gcc-2884c41e1c9d2abd8dd3db430d26fb56b7de6ea1.zip gcc-2884c41e1c9d2abd8dd3db430d26fb56b7de6ea1.tar.gz gcc-2884c41e1c9d2abd8dd3db430d26fb56b7de6ea1.tar.bz2 |
parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string concatenation.
* parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
concatenation.
(OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
* parse.y (register_fields): Don't pass a format specifier to
OBSOLETE_MODIFIER_WARNING.
(check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
specifier.
(check_modifiers): Change function into a macro.
(check_class_interface_creation): Pass a literal format string.
From-SVN: r31614
Diffstat (limited to 'gcc/java/parse.h')
-rw-r--r-- | gcc/java/parse.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/java/parse.h b/gcc/java/parse.h index 62acc70..41cb0e9 100644 --- a/gcc/java/parse.h +++ b/gcc/java/parse.h @@ -138,13 +138,20 @@ extern tree stabilize_reference PARAMS ((tree)); /* Pedantic warning on obsolete modifiers. Note: when cl is NULL, flags was set artificially, such as for a interface method */ -#define OBSOLETE_MODIFIER_WARNING(cl, flags, __modifier, format, arg) \ +#define OBSOLETE_MODIFIER_WARNING(cl, flags, __modifier, arg) \ { \ if (flag_redundant && (cl) && ((flags) & (__modifier))) \ parse_warning_context (cl, \ - "Discouraged redundant use of `%s' modifier in declaration of " format, \ + "Discouraged redundant use of `%s' modifier in declaration of %s", \ java_accstring_lookup (__modifier), arg); \ } +#define OBSOLETE_MODIFIER_WARNING2(cl, flags, __modifier, arg1, arg2) \ + { \ + if (flag_redundant && (cl) && ((flags) & (__modifier))) \ + parse_warning_context (cl, \ + "Discouraged redundant use of `%s' modifier in declaration of %s `%s'", \ + java_accstring_lookup (__modifier), arg1, arg2);\ + } /* Quickly build a temporary pointer on hypothetical type NAME. */ #define BUILD_PTR_FROM_NAME(ptr, name) \ |