diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1999-10-14 17:13:57 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1999-10-14 17:13:57 +0000 |
commit | 1ebadc609b97abf76eddff241200b4dcf8b10eb9 (patch) | |
tree | ec9cc3db1f41e003ff786220d74ae92ec3483df3 /gcc/java/parse.h | |
parent | fe50c0eb3bcd01019e3b8e610b3906510a5d4b8e (diff) | |
download | gcc-1ebadc609b97abf76eddff241200b4dcf8b10eb9.zip gcc-1ebadc609b97abf76eddff241200b4dcf8b10eb9.tar.gz gcc-1ebadc609b97abf76eddff241200b4dcf8b10eb9.tar.bz2 |
jcf-dump.c (print_constant, [...]): Don't call a variadic function with a non-literal format string.
* jcf-dump.c (print_constant, disassemble_method): Don't call a
variadic function with a non-literal format string.
* parse-scan.y (report_main_declaration): Likewise.
* parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
* parse.y (read_import_dir, patch_assignment, patch_binop,
patch_array_ref): Likewise.
* typeck.c (build_java_array_type): Likewise.
* verify.c (verify_jvm_instructions): Likewise.
From-SVN: r29981
Diffstat (limited to 'gcc/java/parse.h')
-rw-r--r-- | gcc/java/parse.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/java/parse.h b/gcc/java/parse.h index cf29219..f4c05e9 100644 --- a/gcc/java/parse.h +++ b/gcc/java/parse.h @@ -222,12 +222,19 @@ extern tree stabilize_reference PROTO ((tree)); "numeric type", operator_string ((NODE)), lang_printable_name ((TYPE), 0)) #define ERROR_CAST_NEEDED_TO_INTEGRAL(OPERATOR, NODE, TYPE) \ - parse_error_context \ - ((OPERATOR), (JPRIMITIVE_TYPE_P (TYPE) ? \ - "Incompatible type for `%s'. Explicit cast needed to convert " \ - "`%s' to integral" : "Incompatible type for `%s'. Can't convert " \ - "`%s' to integral"), operator_string ((NODE)), \ - lang_printable_name ((TYPE), 0)) +do { \ + tree _operator = (OPERATOR), _node = (NODE), _type = (TYPE); \ + if (JPRIMITIVE_TYPE_P (_type)) \ + parse_error_context (_operator, "Incompatible type for `%s'. Explicit" \ + " cast needed to convert `%s' to integral", \ + operator_string(_node), \ + lang_printable_name (_type, 0)); \ + else \ + parse_error_context (_operator, "Incompatible type for `%s'. Can't" \ + " convert `%s' to integral", \ + operator_string(_node), \ + lang_printable_name (_type, 0)); \ +} while (0) #define ERROR_VARIABLE_NOT_INITIALIZED(WFL, V) \ parse_error_context \ |