diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-25 18:29:02 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-25 18:29:02 +0000 |
commit | 8e6f8d9d87c8f97f50c1fe18e04273b9538dc023 (patch) | |
tree | 1a4a974cd0413f12b6184b71c09453d5d010ca6a /gcc/java/parse.h | |
parent | 13b7c373876229eb659596cebd9bf6c4336b0f02 (diff) | |
download | gcc-8e6f8d9d87c8f97f50c1fe18e04273b9538dc023.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31614 138bc75d-0d04-0410-961f-82ee72b054a4
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 62acc705db1..41cb0e94c64 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) \ |