diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-14 17:13:57 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-14 17:13:57 +0000 |
commit | 3f35e9ca5d9d4d973a7ee19fbc85a9ec81df4e8c (patch) | |
tree | ec9cc3db1f41e003ff786220d74ae92ec3483df3 /gcc/java/parse.h | |
parent | 85f7a3027a35956f0922461c7d25a15d1401e253 (diff) | |
download | gcc-3f35e9ca5d9d4d973a7ee19fbc85a9ec81df4e8c.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29981 138bc75d-0d04-0410-961f-82ee72b054a4
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 cf292192b1f..f4c05e948b1 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 \ |