- 16 Jul, 2014 6 commits
-
-
When a system macro is expanded in a non-system file during out-of-line preprocessing, it can happen that the preprocessor forgets to emit line markers to express the system-ness status of tokens that come after the expansion of the macro. That can lead to situations where the entire non-system file can be considered as being a system file and thus have its warnings be discarded during the compilation of the resulting preprocessed file. My understanding is that this is due to the preprocessor not systematically detecting (and reporting) the change in system-ness of tokens. And this is what this patch does. Each time the system-ness of a given token is different from the previous token that was emitted by the preprocessor, it emits a line marker for the sole purpose of marking the new system-ness of the subsequent tokens to come. Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. gcc/c-family/ChangeLog: * c-ppoutput.c (struct print::prev_was_system_token): New data member. (init_pp_output): Initialize it. (maybe_print_line_1, maybe_print_line, print_line_1, print_line) (do_line_change): Return a flag saying if a line marker was emitted or not. (scan_translation_unit): Detect if the system-ness of the token we are about to emit is different from the one of the previously emitted token. If so, emit a line marker. Avoid emitting useless adjacent line markers. Avoid emitting line markers for tokens originating from the expansion of built-in macros. (scan_translation_unit_directives_only): Adjust. gcc/testsuite/ChangeLog: * gcc.dg/cpp/syshdr{4,5}.{c,h}: New test files. Signed-off-by: Dodji Seketeli <dodji@redhat.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> From-SVN: r212638
Dodji Seketeli committed -
When a built-in macro is expanded, the location of the token in the epansion list is the location of the expansion point of the built-in macro. This patch creates a virtual location for that token instead, effectively tracking locations of tokens resulting from built-in macro tokens. libcpp/ * include/line-map.h (line_maps::builtin_location): New data member. (line_map_init): Add a new parameter to initialize the new line_maps::builtin_location data member. * line-map.c (linemap_init): Initialize the line_maps::builtin_location data member. * macro.c (builtin_macro): Create a macro map and track the token resulting from the expansion of a built-in macro. gcc/ * input.h (is_location_from_builtin_token): New function declaration. * input.c (is_location_from_builtin_token): New function definition. * toplev.c (general_init): Tell libcpp what the pre-defined spelling location for built-in tokens is. Signed-off-by: Dodji Seketeli <dodji@redhat.com> From-SVN: r212637
Dodji Seketeli committed -
* Minor ChangeLog adjustments. From-SVN: r212584
Paolo Carlini committed -
* omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS on the FUNCTION_DECL. From-SVN: r212582
Jakub Jelinek committed -
2014-07-16 Richard Biener <rguenther@suse.de> PR other/61782 * doc/extend.texi (always_inline): Clarify. From-SVN: r212581
Richard Biener committed -
From-SVN: r212579
GCC Administrator committed
-
- 15 Jul, 2014 19 commits
-
-
PR c++/61811 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals. From-SVN: r212576
Jason Merrill committed -
2014-07-15 Eric Christopher <echristo@gmail.com> * doc/invoke.texi (Link Options): Document -z option. From-SVN: r212575
Eric Christopher committed -
PR c++/60848 PR c++/61723 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO. * class.c (finish_struct): Reject invalid definition of std::initializer_list. From-SVN: r212574
Jason Merrill committed -
From-SVN: r212573
Uros Bizjak committed -
* gfortran.dg/ieee/rounding_1.f90: Rename from ieee_rounding_1.f90. * gfortran.dg/ieee/ieee_1.f90: Rename from ieee_1.F90. (dg-additional-options): Add -mieee-with-inexact for alpha*-*-*. From-SVN: r212570
Uros Bizjak committed -
* config/alpha/alpha.c (alpha_atomic_assign_expand_fenv): New. (TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New define. testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_fenv_exceptions): Add IEEE options to compile flags. * gcc.dg/atomic/c11-atomic-exec-5.c: Ditto. Add -mieee-with-inexact additional option and lower ITER_COUNT to 100 for alpha*-*-* targets. From-SVN: r212568
Uros Bizjak committed -
From-SVN: r212566
Jan Hubicka committed -
* asan.c (asan_finish_file): Use varpool_finalize_decl instead of varpool_assemble_decl. * varpool.c (varpool_assemble_decl): Assert that node->definition is true. From-SVN: r212564
Bernd Schmidt committed -
PR rtl-optimization/61772 * ifcvt.c (dead_or_predicable): Check jump to be free of side effects. testsuite/ * gcc.dg/torture/pr61772.c: New test. From-SVN: r212563
Michael Matz committed -
2014-07-15 Paolo Carlini <paolo.carlini@oracle.com> * call.c (convert_like_real): Call print_z_candidate and inform only if permerror returns true. From-SVN: r212560
Paolo Carlini committed -
2014-07-15 Richard Biener <rguenther@suse.de> * opts.c (default_options_table): Disable bit-ccp at -Og. From-SVN: r212559
Richard Biener committed -
printers.py (SingleObjContainerPrinter): New base class for experimental::any and experimental::optional printers. * python/libstdcxx/v6/printers.py (SingleObjContainerPrinter): New base class for experimental::any and experimental::optional printers. (StdExpAnyPrinter, StdExpOptionalPrinter, StdExpStringViewPrinter): New printers for Fundamentals TS types. * testsuite/libstdc++-prettyprinters/libfundts.cc: New. From-SVN: r212556
Jonathan Wakely committed -
* python/libstdcxx/v6/printers.py (TemplateTypePrinter): Add type printer for class templates. (register_type_printers): Use TemplateTypePrinter for containers and other class templates with default template arguments. * testsuite/libstdc++-prettyprinters/whatis.cc: Test new recognizers. From-SVN: r212555
Jonathan Wakely committed -
* c-ubsan.c (ubsan_instrument_bounds): Don't instrument if TYPE_MAX_VALUE is NULL. * gcc.dg/ubsan/bounds-1.c: New test. From-SVN: r212552
Marek Polacek committed -
* fold-const.c (fold_checksum_tree): Move checking of DECL_RESULT. From-SVN: r212550
Jan Hubicka committed -
tree.c (tree_code_size): Add TRANSLATION_UNIT_DECL, NAMESPACE_DECL, IMPORTED_DECL and NAMELIST_DECL... * tree.c (tree_code_size): Add TRANSLATION_UNIT_DECL, NAMESPACE_DECL, IMPORTED_DECL and NAMELIST_DECL; call langhook for unknown declaration. (find_decls_types_r): Do not walk DECL_ARGUMENT_FLD. * tree.h (DECL_ARGUMENTS): Update. * print-tree.c (print_node): Update. * tree-core.h (tree_decl_non_common): Remove arguments. (tree_function_decl): Add arguments. * class.c (build_clone): Do not clear assembler names of templates. * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL. * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL as a special case return sizeof (struct tree_decl_non_common) for other decls. (cp_common_init_ts): Do not initialize NAMESPACE_DECL; initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON. * cp/cp-tree.h (tree_template_decl): New structure. (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL. (union cp_lang_tree_node): Add template_decl. (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update. * lto/lto.c (mentions_vars_p_decl_non_common): Skip DECL_ARGUMENT_FLD. mentions_vars_p_function): Do DECL_ARGUMENTS. (lto_fixup_prevailing_decls): Update. * objc-act.c (objc_common_tree_size): New function. * objc-act.h (KEYWORD_KEY_NAME, KEYWORD_ARG_NAME): Add type checking. (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK): New macro. (METHOD_SEL_NAME, METHOD_SEL_ARGS, METHOD_ADD_ARGS, METHOD_ADD_ARGS_ELLIPSIS_P, METHOD_DEFINITION, METHOD_ENCODING, METHOD_TYPE_ATTRIBUTES, METHOD_PROPERTY_CONTEXT): Add type checking. (METHOD_SEL_ARGS): Use decl_common.size instead of decl_non_common.result. (PROPERTY_NAME, PROPERTY_GETTER_NAME, PROPERTY_SETTER_NAME, PROPERTY_READONLY, PROPERTY_NONATOMIC, PROPERTY_ASSIGN_SEMANTICS, PROPERTY_IVAR_NAME, PROPERTY_DYNAMIC, PROPERTY_HAS_NO_GETTER, PROPERTY_HAS_NO_SETTER, PROPERTY_OPTIONAL): Add type checking. (objc_common_tree_size): Declare. * objc/objc-lang.c (LANG_HOOKS_TREE_SIZE): New macro. From-SVN: r212549
Jan Hubicka committed -
2014-06-15 Tobias Burnus <burnus@net-b.de> gcc/fortran/ * symbol.c (check_conflict): Add codimension conflict with pointer; fix cray-pointee check. gcc/testsuite/ * gfortran.dg/coarray_34.f90: New. * gfortran.dg/coarray_6.f90: Update test case. From-SVN: r212540
Tobias Burnus committed -
PR libstdc++/61720 * include/bits/regex_executor.tcc (_Executor<>::_M_main_dispatch): Clear match queue for next use. * testsuite/28_regex/algorithms/regex_search/61720.cc: New file. From-SVN: r212539
Tim Shen committed -
From-SVN: r212537
GCC Administrator committed
-
- 14 Jul, 2014 15 commits
-
-
2014-06-14 Tobias Burnus <burnus@net-b.de> * trans-intrinsic.c (conv_intrinsic_atomic_ref): Fix handling for kind mismatch with -fcoarray=lib. From-SVN: r212525
Tobias Burnus committed -
PR c++/61445 PR c++/56947 * pt.c (instantiate_decl): Don't check defer_ok for local class members. From-SVN: r212524
Jason Merrill committed -
From-SVN: r212522
Richard Earnshaw committed -
2014-07-14 Richard Biener <rguenther@suse.de> PR tree-optimization/61779 * tree-ssa-copy.c (copy_prop_visit_cond_stmt): Always try simplifying a condition. * gcc.dg/tree-ssa/ssa-copyprop-2.c: New testcase. From-SVN: r212521
Richard Biener committed -
2014-07-14 Richard Biener <rguenther@suse.de> * libgcov.h (struct gcov_fn_info): Make ctrs size 1. From-SVN: r212520
Richard Biener committed -
* include/ext/random.tcc: Unfortunately more fixes for operator>> and operator<< for uniform_on_sphere_distribution. From-SVN: r212517
Ulrich Drepper committed -
2014-07-14 Richard Biener <rguenther@suse.de> PR tree-optimization/61786 * gcc.dg/torture/pr61786.c: New testcase. * gcc.dg/lto/pr61786_0.c: Likewise. * gcc.dg/lto/pr61786_1.c: Likewise. From-SVN: r212515
Richard Biener committed -
2014-07-14 Richard Biener <rguenther@suse.de> * builtins.c (c_strlen): Make only_value == 2 really only affect warning generation. From-SVN: r212514
Richard Biener committed -
2014-07-14 Richard Biener <rguenther@suse.de> PR tree-optimization/61757 PR tree-optimization/61783 PR tree-optimization/61787 * tree-ssa-dom.c (record_equality): Revert canonicalization change and add comment. (propagate_rhs_into_lhs): Revert previous fix, removing loop depth restriction again. * gcc.dg/torture/pr61757.c: New testcase. * gcc.dg/torture/pr61787.c: Likewise. From-SVN: r212513
Richard Biener committed -
* config/arm/cortex-a15.md (cortex_a15_alu): Handle clz, rbit. * config/arm/cortex-a5.md (cortex_a5_alu): Likewise. * config/arm/cortex-a53.md (cortex_a53_alu): Likewise. * config/arm/cortex-a7.md (cortex_a7_alu_reg): Likewise. * config/arm/cortex-a9.md (cortex_a9_dp): Likewise. * config/arm/cortex-m4.md (cortex_m4_alu): Likewise. * config/arm/cortex-r4.md (cortex_r4_alu): Likewise. From-SVN: r212512
Kyrylo Tkachov committed -
2014-07-14 Richard Biener <rguenther@suse.de> * cgraph.h (decl_in_symtab_p): Make inline. From-SVN: r212511
Richard Biener committed -
PR middle-end/61294 gcc/c-family/ * c.opt (Wmemset-transposed-args): New warning. gcc/c/ * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask. If non-NULL, call c_parser_check_literal_zero. (c_parser_check_literal_zero): New function. (c_parser_postfix_expression_after_primary): Adjust c_parser_expr_list caller, handle -Wmemset-transposed-args. gcc/cp/ * cp-tree.h (LITERAL_ZERO_P): Define. * parser.c (cp_parser_parenthesized_expression_list): Add want_literal_zero_p argument, if true, for literal zeros insert INTEGER_CSTs with LITERAL_ZERO_P flag set. (cp_parser_postfix_expression): Adjust cp_parser_parenthesized_expression_list caller, handle -Wmemset-transposed-args. (literal_zeros): New variable. gcc/ * doc/invoke.texi (-Wmemset-transposed-args): Document. gcc/testsuite/ * c-c++-common/Wmemset-transposed-args1.c: New test. * c-c++-common/Wmemset-transposed-args2.c: New test. * g++.dg/warn/Wmemset-transposed-args-1.C: New test. From-SVN: r212510
Jakub Jelinek committed -
PR target/61656 * config/i386/i386.c (classify_argument): Don't merge classes above number of words. From-SVN: r212509
Jakub Jelinek committed -
PR c++/58511 * semantics.c (is_instantiation_of_constexpr): Return true for defaulted functions, too. (explain_invalid_constexpr_fn): Only use explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P. * method.c (explain_implicit_non_constexpr): Pass DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr. From-SVN: r212507
Jason Merrill committed -
PR c++/58611 * decl.c (check_initializer): Don't finish_compound_literal on erroneous constexpr init. From-SVN: r212506
Jason Merrill committed
-