Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r101317
|
|
* c-tree.h (default_function_array_conversion): Declare.
* c-typeck.c (default_function_array_conversion): Export. Correct
comment.
(default_conversion): Do not call
default_function_array_conversion. Do not allow FUNCTION_TYPE.
(build_function_call): Call default_function_array_conversion on
the function.
(convert_arguments): Do not call it on the function arguments.
(build_unary_op): Do not allow ARRAY_TYPE or FUNCTION_TYPE for
TRUTH_NOT_EXPR. Call default_function_array_conversion for taking
address of ARRAY_REF.
(build_compound_expr): Do not call
default_function_array_conversion.
(build_c_cast): Do not call default_function_array_conversion.
(convert_for_assignment): Do not call default_conversion.
(digest_init): Call default_function_array_conversion to convert
string constants and compound literals to pointers, but not
otherwise.
(output_init_element): Likewise.
(build_asm_expr): Do not call default_function_array_conversion.
(c_process_expr_stmt): Likewise.
(c_objc_common_truthvalue_conversion): Likewise. Do not allow
FUNCTION_TYPE.
* c-parser.c (c_parser_expression_conv): New.
(c_parser_asm_operands, c_parser_expr_list): Add convert_p
argument. All callers changed. Call
default_function_array_conversion if convert_p.
(c_parser_initializer, c_parser_initval): Call
default_function_array_conversion except for string constants and
compound literals.
(c_parser_initelt): Call default_function_array_conversion for
ObjC expression received.
(c_parser_statement_after_labels): Call c_parser_expression_conv
for return and expression statements.
(c_parser_paren_condition, c_parser_for_statement,
c_parser_conditional_expression): Call c_parser_expression_conv.
(c_parser_expr_no_commas, c_parser_conditional_expression,
c_parser_binary_expression, c_parser_cast_expression,
c_parser_unary_expression): Call
default_function_array_conversion.
objc:
* objc-act.c (my_build_string_pointer): New.
(objc_get_class_reference, get_super_receiver): Call
my_build_string_pointer instead of my_build_string when building
function arguments.
testsuite:
* gcc.dg/noncompile/20040203-3.c: Update expected message.
From-SVN: r100984
|
|
gcc-internal-format and c-format.
gcc/po/
* exgettext: Handle gmsgid and cmsgid arguments specially,
as gcc-internal-format and c-format. Because of xgettext
bug, invoke xgettext once with --language=c, once with
--language=GCC-source and then merge together. Fail if
xgettext is not 0.14.5 or later.
gcc/
* intl.h (G_): New macro.
* rtl-error.c (error_for_asm, warning_for_asm): Use gmsgid
instead of msgid for argument name.
* tree-ssa.c (warn_uninit): Likewise.
* c-parser.c (c_parser_error): Likewise.
* config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise.
* config/darwin-c.c (BAD): Likewise.
* config/c4x/c4x-c.c (BAD): Likewise.
* c-pragma.c (GCC_BAD, GCC_BAD2): Likewise.
* c-errors.c (pedwarn_c99, pedwarn_c90): Likewise.
* c-common.c (c_parse_error): Likewise.
* diagnostic.c (diagnostic_set_info, verbatim, inform, warning,
warning0, pedwarn, error, sorry, fatal_error, internal_error):
Likewise.
(fnotice): Use cmsgid instead of msgid for argument name.
* gcov.c (fnotice): Likewise.
* protoize.c (notice): Likewise.
* final.c (output_operand_lossage): Likewise.
* gcc.c (fatal, notice): Likewise.
(error): Use gmsgid instead of msgid for argument name.
* collect2.c (notice, fatal_perror, fatal): Use cmsgid instead
of msgid for argument name.
(error): Use gmsgid instead of msgid for argument name.
* c-decl.c (locate_old_decl, implicit_decl_warning): Use G_()
instead of N_().
* c-typeck.c (readonly_error, convert_for_assignment): Likewise.
* tree-inline.c (inline_forbidden_p_1): Likewise.
* ABOUT-GCC-NLS: Require gettext 0.14.5 or later. Mention the new
conventions for marking translations.
* doc/install.texi: Mention gettext 0.14.5 or later requirement.
gcc/cp/
* error.c (locate_error): Use gmsgid instead of msgid for argument
name.
(cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
gcc/java/
* jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
msgid for argument name.
* gjavah.c (error): Likewise.
* java-tree.h (parse_error_context): Likewise.
* parse.y (parse_error_context, parse_warning_context,
issue_warning_error_from_context): Likewise.
From-SVN: r100676
|
|
* c-parser.c (c_parser_parms_declarator): Don't use chainon().
(c_parser_expr_list): Don't use chainon().
From-SVN: r100567
|
|
* c-common.c, c-parser.c, cfgbuild.c, cfghooks.c, cfghooks.h,
cfgrtl.c, cgraphunit.c, ddg.c, expr.h, gcse.c, ggc-page.c,
ggc-zone.c, gimplify.c, ipa-inline.c, longlong.h, targhooks.c,
tree-flow-inline.h, tree-pass.h, tree-ssa-dse.c,
tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c,
tree-ssa-operands.c, tree-vect-analyze.c,
tree-vect-transform.c, tree-vectorizer.c, tree.c,
config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
config/frv/frv.md, config/i386/i386.c, config/i386/sse.md,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore.c, config/mips/mips.c, config/mips/mips.md,
config/rs6000/darwin-ldouble.c, config/rs6000/rs6000.c,
config/rs6000/rs6000.h, config/sh/sh.c, config/sh/sh.md,
config/sh/ushmedia.h, config/sparc/sparc.c,
config/sparc/sparc.md, config/stormy16/stormy-abi: Fix comment
typos. Follow spelling conventions.
* doc/invoke.texi, doc/tm.texi, doc/tree-ssa.texi: Fix typos.
Follow spelling conventions.
From-SVN: r100218
|
|
warning(OPT_*).
* c-common.c (unsigned_conversion_warning): Move warning control
from if() to warning(OPT_*).
(c_common_truthvalue_conversion): Likewise.
(c_do_switch_warnings): Likewise.
* c-decl.c (diagnose_mismatched_decls): Likewise.
(diagnose_mismatched_decls): Likewise.
(define_label): Likewise.
(grokdeclarator): Likewise.
* c-format.c (check_format_info): Likewise.
* c-lex.c (interpret_integer): Likwise.
(lex_string): Likewise.
* c-opts.c (c_common_post_options): Likewise.
* c-parser.c (c_parser_unary_expression): Likewise.
* c-pragma.c (handle_pragma_redefine_extname): Likewise.
(handle_pragma_extern_prefix): Likewise.
* c-typeck.c (build_binary_op): Likewise.
* gcse.c (is_too_expensive): Likewise.
* opts.c (decode_options): Likewise.
* stor-layout.c (place_field): Likewise.
* tree-cfg.c (remove_bb): Likewise.
* c.opt (-Wreturn-type): Add Var(warn_return_type).
* flags.h (warn_return_type): Remove.
* toplev.c (warn_return_type): Likewise.
From-SVN: r100135
|
|
* c-tree.h (parser_build_unary_op): New prototype.
* c-typeck.c (parser_build_unary_op): New function to construct
a unary operation in the C parser.
* c-parser.c (c_parser_unary_expression): Use the new function
parser_build_unary_op when appropriate.
From-SVN: r99471
|
|
* diagnostic.c (warning): Accept parameter to classify warning option.
(warning0): New, for when a pointer to an error() like function is needed.
* errors.c (warning): Likewise.
* errors.h (warning, warning0): Adjust prototypes.
* toplev.h (warning, warning0): Likewise.
* attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c,
c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c,
c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c,
fold-const.c, fortran/trans-decl.c, function.c, gcse.c,
genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c,
reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c,
tree-ssa.c, tree.c, varasm.c: Adjust warning() callers.
* config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c,
config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c,
config/darwin.c, config/darwin.h, config/h8300/h8300.c,
config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c,
config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c,
config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h,
config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h,
config/rs6000/aix52.h, config/rs6000/darwin.h,
config/rs6000/rs6000-c.c, config/rs6000/rs6000.c,
config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
config/sh/symbian.c, config/sol2-c.c, config/sol2.c,
config/stormy16/stormy16.c, config/v850/v850-c.c,
config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning()
callers.
* ada/misc.c: Adjust warning() callers.
* cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c,
cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c,
cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c,
cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers.
* fortran/trans-decl.c: Adjust warning() callers.
* java/class.c, java/decl.c, java/expr.c, java/jcf-io.c,
java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning()
callers.
* objc/objc-act.c: Adjust warning() callers.
* treelang/parse.y: Adjust warning() callers.
From-SVN: r98633
|
|
* c-common.h (objc_build_method_signature): Update prototype.
* stub-objc.c (objc_build_method_signature): Update the stub
implementation to accept and ignore additional parameter.
* c-parser.c (c_parser_objc_method_decl): Reorgnize to pass
the value of ellipsis to objc_build_method_signature instead
of setting TREE_OVERFLOW on the parms TREE_LIST node.
* objc-act.h (METHOD_ADD_ARGS_ELLIPSIS_P): New macro for accessing
this field of an objc method decl.
* objc-act.c (build_method_decl): Take an additional "ellipsis"
argument, and set METHOD_ADD_ARGS_ELLIPSIS_P as appropriate.
(objc_build_method_signature): Accept additional "ellipsis"
argument and pass it to build_method_decl.
(get_arg_type_list, start_method_def, gen_method_decl): Use
the new METHOD_ADD_ARGS_ELLIPSIS_P instead of examining the
TREE_OVERFLOW field of a TREE_LIST node.
From-SVN: r98528
|
|
From-SVN: r98260
|
|
are closed properly)
PR c/20672
* c-parser.c (c_parser_compound_statement_nostart): Give error
message for EOF instead of just setting parser->error.
testsuite:
* gcc.dg/pr20672-1.c: New test.
From-SVN: r97197
|
|
* c-common.c (c_common_truthvalue_conversion): Adjust comment.
Call c_common_truthvalue_conversion rather than
lang_hooks.truthvalue_conversion.
* c-convert.c (convert): Call c_objc_common_truthvalue_conversion.
* c-objc-common.c (c_objc_common_truthvalue_conversion): Move to
c-typeck.c.
* c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Change to
c_common_truthvalue_conversion.
* c-parser.c (c_parser_paren_condition, c_parser_for_statement,
c_parser_conditional_expression, c_parser_binary_expression): Call
c_objc_common_truthvalue_conversion.
* c-typeck.c (build_unary_op): Call
c_objc_common_truthvalue_conversion.
(build_conditional_expr): Do not call
lang_hooks.truthvalue_conversion.
(build_binary_op): Call c_common_truthvalue_conversion.
(c_objc_common_truthvalue_conversion): Moved from
c-objc-common.c. Call default_function_array_conversion instead
of default_conversion.
objc:
* objc-act.c (next_sjlj_build_enter_and_setjmp,
next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally):
Call c_common_truthvalue_conversion.
From-SVN: r96917
|
|
INTEGER_CSTs.
* c-common.c (handle_aligned_attribute, check_function_sentinel,
get_nonnull_operand, handle_sentinel_attribute,
check_function_arguments_recurse): Do not strip NOPS from
INTEGER_CSTs.
* c-decl.c (check_bitfield_type_and_width, build_enumerator):
Likewise.
* c-format.c (get_constant): Likewise.
* c-parser.c (c_parser_postfix_expression): Likewise.
* c-typeck.c (set_init_index): Likewise.
(convert_arguments): Don't check for NOP_EXPR containing integer
constant.
From-SVN: r96760
|
|
PR c/20402
* c-parser.c (c_parser_struct_or_union_specifier): Don't fall
through into call to parser_xref_tag after parse error.
(c_parser_struct_declaration): Consistently return NULL_TREE on
error.
testsuite:
* gcc.dg/noncompile/920923-1.c: Detail expected diagnostics for
new parser.
From-SVN: r96363
|
|
* c-tree.h (struct c_declarator): New id_loc field.
* c-pragma.h (c_lex_with_flags): Take position reference.
* c-lex.c (c_lex_with_flags): Set passed-in location from cpp token,
iff USE_MAPPED_LOCATION. (Type doesn't match otherwise.)
(c_lex): Pass dummy location to c_lex_with_flags.
* c-parser.c (c_lex_one_token): Set c_token's location using
c_lex_with_flags, instead of input_location, which might be "ahead".
(c_parser_direct_declarator): Set declarator's id_loc from
c_token's id_loc.
* c-decl.c (grokdeclarator): Set DECL_SOURCE_LOCATION from
declarator's id_loc, rather than probably-imprecise input_location.
(build_id_declarator): Initialize c_declarator's id_loc field.
From-SVN: r96329
|
|
* c-decl.c (finish_function): Use SET_EXPR_LOCATION instead of
unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
* tree-cfg.c (remove_bb): If USE_MAPPED_LOCATION, change type of
local variable loc. Change logic appropriately.
* tree-vect-transform.c (vect_finish_stmt_generation): Use
EXPR_LOCATION rather than EXPR_LOCUS if USE_MAPPED_LOCATION.
* c-parser.c (c_parser_for_statement): Initialize loc variable.
* tree.h (DECL_IS_BUILTIN): Temporarily revert definition of
DECL_IS_BUILTIN in the USE_MAPPED_LOCATION because of jc1 issues.
From-SVN: r96045
|
|
PR c/8927
* c-tree.h (undeclared_variable, build_external_ref): Add extra
argument.
* c-decl.c (undeclared_variable): Take location as argument.
* c-typeck.c (build_external_ref): Likewise.
* c-parser.c (c_parser_postfix_expression): Pass location of
identifier to build_external_ref.
testsuite:
* gcc.dg/pr8927-1.c: New test.
From-SVN: r95773
|
|
PR c/20245
* c-parser.c (c_parser_compound_statement): Return error_mark_node
instead of NULL_TREE on error.
testsuite:
* gcc.dg/pr20245-1.c: New test.
From-SVN: r95693
|
|
* c-parser.c: New file.
* c-parse.in: Remove.
* Makefile.in (c-parse.o-warn, c-parse.o, c-parse.c, c-parse.y):
Remove.
(c-parser.o): Add dependencies.
(C_AND_OBJC_OBJC, C_OBJS, gcc.srcextra, GTFILES, distclean,
maintainer-clean, TAGS): Update.
* c-config-lang.in (gtfiles): Update.
* gengtype-lex.l: Don't handle "@@".
* stub-objc.c (objc_get_class_ivars, objc_build_throw_stmt,
objc_build_synchronized, objc_begin_try_stmt,
objc_begin_catch_clause, objc_finish_catch_clause,
objc_build_finally_clause, objc_finish_try_stmt): New.
* c-tree.h (struct c_declspecs): Add declspecs_seen_p and
type_seen_p.
(c_parse_init): Update comment.
* c-decl.c (c_init_decl_processing): Update comment.
(build_null_declspecs, declspecs_add_qual, declspecs_add_type,
declspecs_add_scspec, declspecs_add_attrs): Initialize and update
new c_declspecs members.
objc:
* Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o,
objc/objc-parse.c, objc/objc-parse.y): Remove
(OBJC_OBJS, objc.srcextra, objc.tags, objc.mostlyclean,
objc.distclean, objc.maintainer-clean): Update for new parser.
* config-lang.in (gtfiles): Update for new parser.
testsuite:
* gcc.dg/cpp/separate-1.c, gcc.dg/noncompile/971104-1.c,
gcc.dg/noncompile/990416-1.c: Adjust expected messages for new
parser.
From-SVN: r95558
|