1. 31 Jul, 2015 1 commit
  2. 24 Jul, 2015 1 commit
  3. 08 Jul, 2015 1 commit
    • Address -Wsign-compare diagnostics · d17f7d59
      ... which have been introduced in r223152, for example hundreds of:
      
          [...]/gcc/input.h:37:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      
      	libcpp/
      	* include/line-map.h (RESERVED_LOCATION_COUNT): Change type to
      	source_location.
      
      From-SVN: r225558
      Thomas Schwinge committed
  4. 03 Jul, 2015 1 commit
  5. 02 Jul, 2015 2 commits
  6. 30 Jun, 2015 2 commits
    • Implement N4197 - Adding u8 character literals · fe95b036
      
      libcpp:
      
      2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	Implement N4197 - Adding u8 character literals
      	* include/cpplib.h (UTF8CHAR, UTF8CHAR_USERDEF): New cpp tokens;
      	(struct cpp_options): Add utf8_char_literals.
      	* init.c (struct lang_flags): Add utf8_char_literals;
      	(struct lang_flags lang_defaults): Add column for utf8_char_literals.
      	* macro.c (stringify_arg()): Treat CPP_UTF8CHAR token; 
      	* expr.c (cpp_userdef_char_remove_type(), cpp_userdef_char_add_type()):
      	Treat CPP_UTF8CHAR_USERDEF, CPP_UTF8CHAR tokens;
      	(cpp_userdef_char_p()): Treat CPP_UTF8CHAR_USERDEF token;
      	(eval_token(), _cpp_parse_expr()): Treat CPP_UTF8CHAR token.
      	* lex.c (lex_string(), _cpp_lex_direct()): Include CPP_UTF8CHAR tokens.
      	* charset.c (converter_for_type(), cpp_interpret_charconst()):
      	Treat CPP_UTF8CHAR token.
      
      
      gcc/c-family:
      
      2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	Implement N4197 - Adding u8 character literals
      	* c-family/c-ada-spec.c (print_ada_macros()): Treat CPP_UTF8CHAR
      	like CPP_CHAR.
      	* c-family/c-common.c (c_parse_error()): print CPP_UTF8CHAR
      	and CPP_UTF8CHAR_USERDEF tokens.
      	* c-family/c-lex.c (c_lex_with_flags()): Treat CPP_UTF8CHAR_USERDEF
      	and CPP_UTF8CHAR tokens; (lex_charconst()): Treat CPP_UTF8CHAR token.
      
      
      gcc/cp:
      
      2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	Implement N4197 - Adding u8 character literals
      	* parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
      	and CPP_UTF8CHAR_USERDEF tokens;
      	(cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
      
      
      gcc/testsuite:
      
      2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	Implement N4197 - Adding u8 character literals
      	* g++.dg/cpp1z/utf8.C: New.
      	* g++.dg/cpp1z/utf8-neg.C: New.
      	* g++.dg/cpp1z/udlit-utf8char.C: New.
      
      From-SVN: r225185
      Edward Smith-Rowland committed
    • lex.c (search_line_sse42): New main loop using asm flag outputs. · dc6bcf52
      	* lex.c (search_line_sse42) [__GCC_ASM_FLAG_OUTPUTS__]: New main
      	loop using asm flag outputs.
      
      From-SVN: r225160
      Uros Bizjak committed
  7. 08 Jun, 2015 1 commit
  8. 26 May, 2015 1 commit
    • line-map.c (LINE_MAP_MAX_COLUMN_NUMBER… · 815facd3
      line-map.c (LINE_MAP_MAX_COLUMN_NUMBER LINE_MAP_MAX_LOCATION_WITH_COLS,LINE_MAP_MAX_SOURCE_LOCATION): New constants.
      
      libcpp/ChangeLog:
      
      2015-05-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	* line-map.c (LINE_MAP_MAX_COLUMN_NUMBER
      	LINE_MAP_MAX_LOCATION_WITH_COLS,LINE_MAP_MAX_SOURCE_LOCATION):
      	New constants.
      	(linemap_line_start): Use them.
      	(linemap_position_for_column): Use them.
      
      From-SVN: r223705
      Manuel López-Ibáñez committed
  9. 20 May, 2015 1 commit
    • libcpp: Eliminate most of the non-const/reference-returning inline fns · c819ed29
      gcc/java/ChangeLog:
      	* jcf-parse.c (set_source_filename): Replace write through
      	ORDINARY_MAP_FILE_NAME with direct access to "to_file".
      
      libcpp/ChangeLog:
      	* include/line-map.h (MAP_START_LOCATION): Eliminate the non-const
      	variant, and tweak comment for the const variant.
      	(ORDINARY_MAP_STARTING_LINE_NUMBER): Drop the non-const variant.
      	(ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
      	(ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
      	(SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete.
      	(ORDINARY_MAP_FILE_NAME): Drop the non-const variant.
      	(MACRO_MAP_MACRO): Likewise.
      	(MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
      	(MACRO_MAP_LOCATIONS): Likewise.
      	(MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
      	* line-map.c (linemap_add): Replace writes through macros with
      	direct field accesses.
      	(linemap_enter_macro): Likewise.
      	(linemap_line_start): Likewise.
      
      From-SVN: r223435
      David Malcolm committed
  10. 19 May, 2015 1 commit
    • Replace line_map union with C++ class hierarchy · 0e50b624
      gcc/ChangeLog:
      	* diagnostic.c (diagnostic_report_current_module): Strengthen
      	local "new_map" from const line_map * to
      	const line_map_ordinary *.
      	* genmatch.c (error_cb): Likewise for local "map".
      	(output_line_directive): Likewise for local "map".
      	* input.c (expand_location_1): Likewise for local "map".
      	Pass NULL rather than &map to
      	linemap_unwind_to_first_non_reserved_loc, since the value is never
      	read from there, and the value written back not read from here.
      	(is_location_from_builtin_token): Strengthen local "map" from
      	const line_map * to const line_map_ordinary *.
      	(dump_location_info): Strengthen locals "map" from
      	line_map *, one to const line_map_ordinary *, the other
      	to const line_map_macro *.
      	* tree-diagnostic.c (loc_map_pair): Strengthen field "map" from
      	const line_map * to const line_map_macro *.
      	(maybe_unwind_expanded_macro_loc): Add a call to
      	linemap_check_macro when writing to the "map" field of the
      	loc_map_pair.
      	Introduce local const line_map_ordinary * "ord_map", using it in
      	place of "map" in the part of the function where we know we have
      	an ordinary map.  Strengthen local "m" from const line_map * to
      	const line_map_ordinary *.
      
      gcc/ada/ChangeLog:
      	* gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
      	from line_map * to line_map_ordinary *.
      
      gcc/c-family/ChangeLog:
      	* c-common.h (fe_file_change): Strengthen param from
      	const line_map * to const line_map_ordinary *.
      	(pp_file_change): Likewise.
      	* c-lex.c (fe_file_change): Likewise.
      	(cb_define): Use linemap_check_ordinary when invoking
      	SOURCE_LINE.
      	(cb_undef): Likewise.
      	* c-opts.c (c_finish_options): Use linemap_check_ordinary when
      	invoking cb_file_change.
      	(c_finish_options): Likewise.
      	(push_command_line_include): Likewise.
      	(cb_file_change): Strengthen param "new_map" from
      	const line_map * to const line_map_ordinary *.
      	* c-ppoutput.c (cb_define): Likewise for local "map".
      	(pp_file_change): Likewise for param "map" and local "from".
      
      gcc/fortran/ChangeLog:
      	* cpp.c (maybe_print_line): Strengthen local "map" from
      	const line_map * to const line_map_ordinary *.
      	(cb_file_change): Likewise for param "map" and local "from".
      	(cb_line_change): Likewise for local "map".
      
      libcpp/ChangeLog:
      	* directives.c (do_line): Strengthen local "map" from
      	const line_map * to const line_map_ordinary *.
      	(do_linemarker): Likewise.
      	(_cpp_do_file_change): Assert that we're not dealing with
      	a macro map.  Introduce local "ord_map" via a call to
      	linemap_check_ordinary, guarded within the check for
      	non-NULL.  Use it for typesafety.
      	* files.c (cpp_make_system_header): Strengthen local "map" from
      	const line_map * to const line_map_ordinary *.
      	* include/cpplib.h (struct cpp_callbacks): Likewise for second
      	parameter of "file_change" callback.
      	* include/line-map.h (struct line_map): Convert from a struct
      	containing a union to a base class.
      	(struct line_map_ordinary): Convert to a subclass of line_map.
      	(struct line_map_macro): Likewise.
      	(linemap_check_ordinary): Strengthen return type from line_map *
      	to line_map_ordinary *, and add a const-variant.
      	(linemap_check_macro): New pair of functions.
      	(ORDINARY_MAP_STARTING_LINE_NUMBER): Strengthen param from
      	const line_map * to const line_map_ordinary *, eliminating call
      	to linemap_check_ordinary.  Likewise for the non-const variant.
      	(ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
      	(ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
      	(ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Likewise.
      	(ORDINARY_MAP_FILE_NAME): Likewise.
      	(MACRO_MAP_MACRO): Strengthen param from const line_map * to
      	const line_map_macro *.  Likewise for the non-const variant.
      	(MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
      	(MACRO_MAP_LOCATIONS): Likewise.
      	(MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
      	(struct maps_info): Replace with...
      	(struct maps_info_ordinary):...this and...
      	(struct maps_info_macro): ...this.
      	(struct line_maps): Convert fields "info_ordinary" and
      	"info_macro" to the above new structs.
      	(LINEMAPS_MAP_INFO): Delete both functions.
      	(LINEMAPS_MAPS): Likewise.
      	(LINEMAPS_ALLOCATED): Rewrite both variants to avoid using
      	LINEMAPS_MAP_INFO.
      	(LINEMAPS_USED): Likewise.
      	(LINEMAPS_CACHE): Likewise.
      	(LINEMAPS_MAP_AT): Likewise.
      	(LINEMAPS_ORDINARY_MAPS): Strengthen return type from line_map *
      	to line_map_ordinary *.
      	(LINEMAPS_ORDINARY_MAP_AT): Likewise.
      	(LINEMAPS_LAST_ORDINARY_MAP): Likewise.
      	(LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise.
      	(LINEMAPS_MACRO_MAPS): Strengthen return type from line_map * to
      	line_map_macro *.
      	(LINEMAPS_MACRO_MAP_AT): Likewise.
      	(LINEMAPS_LAST_MACRO_MAP): Likewise.
      	(LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise.
      	(linemap_map_get_macro_name): Strengthen param from
      	const line_map * to const line_map_macro *.
      	(SOURCE_LINE): Strengthen first param from const line_map * to
      	const line_map_ordinary *, removing call to
      	linemap_check_ordinary.
      	(SOURCE_COLUMN): Likewise.
      	(LAST_SOURCE_LINE_LOCATION): Likewise.
      	(LAST_SOURCE_LINE): Strengthen first param from const line_map *
      	to const line_map_ordinary *.
      	(LAST_SOURCE_COLUMN): Likewise.
      	(INCLUDED_FROM): Strengthen return type from line_map * to
      	line_map_ordinary *., and second param from const line_map *
      	to const line_map_ordinary *, removing call to
      	linemap_check_ordinary.
      	(MAIN_FILE_P): Strengthen param from const line_map * to
      	const line_map_ordinary *, removing call to
      	linemap_check_ordinary.
      	(linemap_position_for_line_and_column): Strengthen param from
      	const line_map * to const line_map_ordinary *.
      	(LINEMAP_FILE): Strengthen param from const line_map * to
      	const line_map_ordinary *, removing call to
      	linemap_check_ordinary.
      	(LINEMAP_LINE): Likewise.
      	(LINEMAP_SYSP): Likewise.
      	(linemap_resolve_location): Strengthen final param from
      	const line_map ** to const line_map_ordinary **.
      	* internal.h (CPP_INCREMENT_LINE): Likewise for local "map".
      	(linemap_enter_macro): Strengthen return type from
      	const line_map * to const line_map_macro *.
      	(linemap_add_macro_token): Likewise for first param.
      	* line-map.c (linemap_check_files_exited): Strengthen local "map"
      	from const line_map * to const line_map_ordinary *.
      	(new_linemap): Introduce local "map_size" and use it when
      	calculating how large the buffer should be.  Rewrite based
      	on change of info_macro and info_ordinary into distinct types.
      	(linemap_add): Strengthen locals "map" and "from" from line_map *
      	to line_map_ordinary *.
      	(linemap_enter_macro): Strengthen return type from
      	const line_map * to const line_map_macro *, and local "map" from
      	line_map * to line_map_macro *.
      	(linemap_add_macro_token): Strengthen param "map" from
      	const line_map * to const line_map_macro *.
      	(linemap_line_start): Strengthen local "map" from line_map * to
      	line_map_ordinary *.
      	(linemap_position_for_column): Likewise.
      	(linemap_position_for_line_and_column): Strengthen first param
      	from const line_map * to const line_map_ordinary *.
      	(linemap_position_for_loc_and_offset): Strengthen local "map" from
      	const line_map * to const line_map_ordinary *.
      	(linemap_ordinary_map_lookup): Likewise for return type and locals
      	"cached" and "result".
      	(linemap_macro_map_lookup): Strengthen return type and locals
      	"cached" and "result" from const line_map * to
      	const line_map_macro *.
      	(linemap_macro_map_loc_to_exp_point): Likewise for param "map".
      	(linemap_macro_map_loc_to_def_point): Likewise.
      	(linemap_macro_map_loc_unwind_toward_spelling): Likewise.
      	(linemap_get_expansion_line): Strengthen local "map" from
      	const line_map * to const line_map_ordinary *.
      	(linemap_get_expansion_filename): Likewise.
      	(linemap_map_get_macro_name): Strengthen param from
      	const line_map * to const line_map_macro *.
      	(linemap_location_in_system_header_p): Add call to
      	linemap_check_ordinary in region guarded by
      	!linemap_macro_expansion_map_p.  Introduce local "macro_map" via
      	linemap_check_macro in other region, using it in place of "map"
      	for typesafety.
      	(first_map_in_common_1): Add calls to linemap_check_macro.
      	(trace_include): Strengthen param "map" from const line_map * to
      	const line_map_ordinary *.
      	(linemap_macro_loc_to_spelling_point): Strengthen final param from
      	const line_map ** to const line_map_ordinary **.  Replace a
      	C-style cast with a const_cast, and add calls to
      	linemap_check_macro and linemap_check_ordinary.
      	(linemap_macro_loc_to_def_point): Likewise.
      	(linemap_macro_loc_to_exp_point): Likewise.
      	(linemap_resolve_location): Strengthen final param from
      	const line_map ** to const line_map_ordinary **.
      	(linemap_unwind_toward_expansion): Introduce local "macro_map" via
      	a checked cast and use it in place of *map.
      	(linemap_unwind_to_first_non_reserved_loc): Strengthen local
      	"map1" from const line_map * to const line_map_ordinary *.
      	(linemap_expand_location): Introduce local "ord_map" via a checked
      	cast and use it in place of map.
      	(linemap_dump): Make local "map" const.  Strengthen local
      	"includer_map" from line_map * to const line_map_ordinary *.
      	Introduce locals "ord_map" and "macro_map" via checked casts and
      	use them in place of "map" for typesafety.
      	(linemap_dump_location): Strengthen local "map" from
      	const line_map * to const line_map_ordinary *.
      	(linemap_get_file_highest_location): Update for elimination of
      	union.
      	(linemap_get_statistics): Strengthen local "cur_map" from
      	line_map * to const line_map_macro *.  Update uses of sizeof to
      	use the appropriate line_map subclasses.
      	* macro.c (_cpp_warn_if_unused_macro): Add call to
      	linemap_check_ordinary.
      	(builtin_macro): Strengthen local "map" from const line_map * to
      	const line_map_macro *.
      	(enter_macro_context): Likewise.
      	(replace_args): Likewise.
      	(tokens_buff_put_token_to): Likewise for param "map".
      	(tokens_buff_add_token): Likewise.
      
      From-SVN: r223365
      David Malcolm committed
  11. 13 May, 2015 4 commits
    • libcpp/input.c: Add a way to visualize the linemaps (-fdump-internal-locations) · ba4ad400
      gcc/ChangeLog:
      	* common.opt (fdump-internal-locations): New option.
      	* input.c: Include diagnostic-core.h.
      	(get_end_location): New function.
      	(write_digit): New function.
      	(write_digit_row): New function.
      	(dump_location_range): New function.
      	(dump_labelled_location_range): New function.
      	(dump_location_info): New function.
      	* input.h (dump_location_info): New prototype.
      	* toplev.c (compile_file): Handle flag_dump_locations.
      
      libcpp/ChangeLog:
      	* include/line-map.h (source_location): Add a reference to
      	location-example.txt to the descriptive comment.
      	* location-example.txt: New file.
      
      From-SVN: r223163
      David Malcolm committed
    • libcpp: Replace macro usage with C++ constructs · 0501dbd9
      libcpp/ChangeLog:
      	* include/line-map.h (MAX_SOURCE_LOCATION): Convert from a macro
      	to a const source_location.
      	(RESERVED_LOCATION_COUNT): Likewise.
      	(linemap_check_ordinary): Convert from a macro to a pair of inline
      	functions, for const/non-const arguments.
      	(MAP_START_LOCATION): Likewise.
      	(ORDINARY_MAP_STARTING_LINE_NUMBER): Likewise.
      	(ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
      	(ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
      	(ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Convert from a macro to a
      	pair of inline functions, for const/non-const arguments, where the
      	latter is named...
      	(SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): New function.
      	(ORDINARY_MAP_FILE_NAME): Convert from a macro to a pair of inline
      	functions, for const/non-const arguments.
      	(MACRO_MAP_MACRO): Likewise.
      	(MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
      	(MACRO_MAP_LOCATIONS): Likewise.
      	(MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
      	(LINEMAPS_MAP_INFO): Likewise.
      	(LINEMAPS_MAPS): Likewise.
      	(LINEMAPS_ALLOCATED): Likewise.
      	(LINEMAPS_USED): Likewise.
      	(LINEMAPS_CACHE): Likewise.
      	(LINEMAPS_ORDINARY_CACHE): Likewise.
      	(LINEMAPS_MACRO_CACHE): Likewise.
      	(LINEMAPS_MAP_AT): Convert from a macro to an inline function.
      	(LINEMAPS_LAST_MAP): Likewise.
      	(LINEMAPS_LAST_ALLOCATED_MAP): Likewise.
      	(LINEMAPS_ORDINARY_MAPS): Likewise.
      	(LINEMAPS_ORDINARY_MAP_AT): Likewise.
      	(LINEMAPS_ORDINARY_ALLOCATED): Likewise.
      	(LINEMAPS_ORDINARY_USED): Likewise.
      	(LINEMAPS_LAST_ORDINARY_MAP): Likewise.
      	(LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise.
      	(LINEMAPS_MACRO_MAPS): Likewise.
      	(LINEMAPS_MACRO_MAP_AT): Likewise.
      	(LINEMAPS_MACRO_ALLOCATED): Likewise.
      	(LINEMAPS_MACRO_USED): Likewise.
      	(LINEMAPS_MACRO_LOWEST_LOCATION): Likewise.
      	(LINEMAPS_LAST_MACRO_MAP): Likewise.
      	(LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise.
      	(IS_ADHOC_LOC): Likewise.
      	(COMBINE_LOCATION_DATA): Likewise.
      	(SOURCE_LINE): Likewise.
      	(SOURCE_COLUMN): Likewise.
      	(LAST_SOURCE_LINE_LOCATION): Likewise.
      	(LAST_SOURCE_LINE): Likewise.
      	(LAST_SOURCE_COLUMN): Likewise.
      	(LAST_SOURCE_LINE_LOCATION)
      	(INCLUDED_FROM): Likewise.
      	(MAIN_FILE_P): Likewise.
      	(LINEMAP_FILE): Likewise.
      	(LINEMAP_LINE): Likewise.
      	(LINEMAP_SYSP): Likewise.
      	(linemap_location_before_p): Likewise.
      	* line-map.c (linemap_check_files_exited): Make local "map" const.
      	(linemap_add): Use SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS.
      	(linemap_line_start): Likewise.
      
      From-SVN: r223152
      David Malcolm committed
    • libcpp: Bump to automake 1.11.6 · eb70f327
      2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
      
      	* aclocal.m4: Regenerated with automake-1.11.6.
      
      From-SVN: r223133
      Michael Haubenwallner committed
    • line-map.h: move linemap_assert and friends higher up within the file · 60c12095
      libcpp/ChangeLog:
      	* include/line-map.h (linemap_assert): Move up within the file to
      	before all of the map accessor macros.
      	(linemap_assert_fails): Likewise.
      	(linemap_check_ordinary): Likewise.
      	(linemap_macro_expansion_map_p): Likewise.
      
      From-SVN: r223121
      David Malcolm committed
  12. 12 May, 2015 1 commit
    • Implement -Wmisleading-indentation · c3388e62
      gcc/ChangeLog:
      	* doc/invoke.texi (Warning Options): Add -Wmisleading-indentation.
      	(-Wmisleading-indentation): New option.
      	* Makefile.in (C_COMMON_OBJS): Add c-family/c-indentation.o.
      
      gcc/c-family/ChangeLog:
      	* c-common.h (warn_for_misleading_indentation): New prototype.
      	* c-indentation.c: New file.
      	* c.opt (Wmisleading-indentation): New option.
      
      gcc/c/ChangeLog:
      	* c-parser.c (c_parser_if_body): Add param "if_loc", use it
      	to add a call to warn_for_misleading_indentation.
      	(c_parser_else_body): Likewise, adding param "else_loc".
      	(c_parser_if_statement): Check for misleading indentation.
      	(c_parser_while_statement): Likewise.
      	(c_parser_for_statement): Likewise.
      
      gcc/cp/ChangeLog:
      	* parser.c (cp_parser_selection_statement): Add location and
      	guard_kind arguments to calls to
      	cp_parser_implicitly_scoped_statement.
      	(cp_parser_iteration_statement): Likewise for calls to
      	cp_parser_already_scoped_statement.
      	(cp_parser_implicitly_scoped_statement): Add "guard_loc" and
      	"guard_kind" params; use them to warn for misleading
      	indentation.
      	(cp_parser_already_scoped_statement): Likewise.
      
      gcc/testsuite/ChangeLog:
      	* c-c++-common/Wmisleading-indentation.c: New testcase.
      	* c-c++-common/Wmisleading-indentation-2.c: New testcase.
      	* c-c++-common/Wmisleading-indentation-2.md: New file.
      
      libcpp/ChangeLog:
      	* directives.c (do_line): Set seen_line_directive on line_table.
      	(do_linemarker): Likewise.
      	* include/line-map.h (struct line_maps): Add new field
      	"seen_line_directive".
      
      From-SVN: r223098
      David Malcolm committed
  13. 09 May, 2015 1 commit
  14. 05 May, 2015 2 commits
    • Fix indentation issues seen by -Wmisleading-indentation · 21c0a521
      gcc/ChangeLog:
      	* auto-profile.c (afdo_find_equiv_class): Fix indentation so
      	that it reflects the block structure.
      	(afdo_propagate_edge): Likewise.
      	(afdo_calculate_branch_prob): Likewise.
      	(afdo_annotate_cfg): Likewise.
      	* cfgcleanup.c (equal_different_set_p): Likewise.
      	(try_crossjump_to_edge): Likewise.
      	* cgraph.c (cgraph_node::verify_node): Likewise.
      	* cgraphunit.c (expand_all_functions): Likewise.
      	* config/i386/i386.c (ix86_expand_copysign): Likewise.
      	(exact_dependency_1): Likewise.
      	* dwarf2asm.c (dw2_output_indirect_constants): Likewise.
      	* dwarf2out.c (tree_add_const_value_attribute_for_decl): Likewise.
      	* gensupport.c (process_define_subst): Likewise.
      	* lto-wrapper.c (merge_and_complain): Likewise.
      	* tree-if-conv.c (if_convertible_bb_p): Likewise.
      	* tree-ssa-loop-prefetch.c (find_or_create_group): Likewise.
      	* tree-ssa-tail-merge.c (gsi_advance_fw_nondebug_nonlocal): Likewise.
      	* tree-vect-data-refs.c (vect_grouped_load_supported): Likewise.
      	* tree-vect-loop.c (vectorizable_reduction): Likewise.
      	* tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
      	* tree-vect-stmts.c (vectorizable_shift): Likewise.
      	* tree-vrp.c (vrp_finalize): Likewise.
      	* tree.c (variably_modified_type_p): Likewise.
      
      gcc/cp/ChangeLog:
      	* parser.c (cp_parser_asm_definition): Only test for
              error_mark_node if "outputs" was just set.
      	(cp_parser_asm_definition): Likewise for "inputs".
      
      gcc/fortran/ChangeLog:
      	* expr.c (check_inquiry): Fix indentation so that it reflects the
      	block structure.
      	* interface.c (compare_parameter): Likewise.
      	* parse.c (parse_oacc_structured_block): Likewise.
      	* target-memory.c (expr_to_char): Likewise.
      	* trans-types.c (gfc_init_kinds): Likewise.
      
      libcpp/ChangeLog:
      	* pch.c (cpp_valid_state): Fix indentation so that it reflects the
      	block structure.
      
      From-SVN: r222823
      David Malcolm committed
    • libcpp: Improvements to comments in line-map.h/c · c87b25e6
      libcpp/ChangeLog:
      	* include/line-map.h: Fix comment at the top of the file.
      	(source_location): Rewrite and expand the comment for this
      	typedef, adding an ascii-art table to clarify how source_location
      	values are allocated.
      	* line-map.c: Fix comment at the top of the file.
      
      From-SVN: r222806
      David Malcolm committed
  15. 01 May, 2015 1 commit
  16. 30 Apr, 2015 1 commit
  17. 13 Apr, 2015 1 commit
  18. 12 Apr, 2015 1 commit
  19. 10 Apr, 2015 2 commits
  20. 09 Apr, 2015 1 commit
  21. 07 Apr, 2015 2 commits
  22. 06 Apr, 2015 1 commit
  23. 02 Apr, 2015 1 commit
  24. 24 Mar, 2015 1 commit
  25. 23 Mar, 2015 2 commits
    • * fr.po: Update. · d2e70142
      From-SVN: r221598
      Joseph Myers committed
    • re PR preprocessor/65238 (__has_attribute is not handled properly with -traditional-cpp.) · fb136e35
      	PR preprocessor/65238
      	* internal.h (_cpp_scan_out_logical_line): Add third argument.
      	* directives.c (prepare_directive_trad): Pass false to it.
      	* traditional.c (_cpp_read_logical_line_trad,
      	_cpp_create_trad_definition): Likewise.
      	(struct fun_macro): Add paramc field.
      	(fun_like_macro): New function.
      	(maybe_start_funlike): Handle NODE_BUILTIN macros.  Initialize
      	macro->paramc field.
      	(save_argument): Use macro->paramc instead of
      	macro->node->value.macro->paramc.
      	(push_replacement_text): Formatting fix.
      	(recursive_macro): Use fun_like_macro helper.
      	(_cpp_scan_out_logical_line): Likewise.  Add BUILTIN_MACRO_ARG
      	argument.  Initialize fmacro.paramc field.  Handle builtin
      	function-like macros.
      
      	* c-c++-common/cpp/pr65238-1.c: New test.
      	* gcc.dg/cpp/pr65238-2.c: New test.
      	* gcc.dg/cpp/trad/pr65238-3.c: New test.
      	* gcc.dg/cpp/trad/pr65238-4.c: New test.
      
      From-SVN: r221587
      Jakub Jelinek committed
  26. 17 Mar, 2015 1 commit
  27. 04 Mar, 2015 1 commit
    • re PR target/65261 (bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime… · 44d95244
      re PR target/65261 (bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment)
      
      Fix PR65261
      
      Running bootstrap-ubsan on ppc64le shows many instances of:
      
        libcpp/lex.c:552:30: runtime error: load of misaligned address
        0x01001f31d37a for type 'const uchar', which requires 16 byte alignment
      
      But the unaligned vector loads are intended in this case, because they
      are preferable to forced-alignment on POWER8. So just silence the ubsan
      errors.
      
      2015-03-02  Markus Trippelsdorf  <markus@trippelsdorf.de>
      
      include/
      	PR target/65261
      	* ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.
      
      libcpp/
      	PR target/65261
      	* lex.c (search_line_fast): Silence ubsan errors.
      
      From-SVN: r221190
      Markus Trippelsdorf committed
  28. 25 Feb, 2015 1 commit
    • be.po, [...]: Update. · 6badc991
      	* be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, fi.po, fr.po,
      	id.po, ja.po, nl.po, pr_BR.po, ru.po, sr.po, sv.po, tr.po, uk.po,
      	vi.po, zh_CN.po, zh_TW.po: Update.
      
      From-SVN: r220976
      Joseph Myers committed
  29. 03 Feb, 2015 1 commit
    • PR preprocessor/64803 - __LINE__ inside macro is not constant · f8abc9ba
      Consider the example code mentionned in this PR:
      
       $ cat -n test.c
            1	#define C(a, b) a ## b
            2	#define L(x) C(L, x)
            3	#define M(a) goto L(__LINE__); __LINE__; L(__LINE__):
            4	M(a /* --> this is the line of the expansion point of M.  */
            5	  ); /* --> this is the line of the end of the invocation of M.  */
       $
      
      "cc1 -quiet -E test.c" yields:
      
       goto L5; 5; L4:
          ;
      
      Notice how we have a 'L4' there, where it should be L5.  That is the issue.
      
      My understanding is that during the *second* expansion of __LINE__
      (the one between the two L(__LINE__)), builtin_macro() is called by
      enter_macro_context() with the location of the expansion point of M
      (which is at line 4).  Then _cpp_builtin_macro_text() expands __LINE__
      into the line number of the location of the last token that has been
      lexed, which is the location of the closing parenthesis of the
      invocation of M, at line 5.  So that invocation of __LINE__ is
      expanded into 5.
      
      Now let's see why the last invocation of __LINE__ is expanded into 4.
      
      In builtin_macro(), we have this code at some point:
      
         /* Set pfile->cur_token as required by _cpp_lex_direct.  */
         pfile->cur_token = _cpp_temp_token (pfile);
         cpp_token *token = _cpp_lex_direct (pfile);
         /* We should point to the expansion point of the builtin macro.  */
         token->src_loc = loc;
      
      The first two statements insert a new token in the stream of lexed
      token and pfile->cur_token[-1], is the "new" last token that has been
      lexed.  But the location of pfile->cur_token[-1] is the same location
      as the location of the "previous" pfile->cur_token[-1], by courtesy of
      _cpp_temp_token().  So normally, in subsequent invocations of
      builtin_macro(), the location of pfile->cur_token[-1] should always be
      the location of the closing parenthesis of the invocation of M at line
      5.  Except that that code in master now has the statement
      "token->src_loc = loc;" on the next line.  That statement actually
      sets the location of pfile->cur_token[-1] to 'loc'.  Which is the
      location of the expansion point of M, which is on line 4.
      
      So in the subsequent call to builtin_macro() (for the last expansion
      of __LINE__ in L(__LINE__)), for _cpp_builtin_macro_text(),
      pfile->cur_token[-1].src_loc is going to have a line number of 4.
      
      I think the core issue here is that the location that is passed to
      builtin_macro() from enter_macro_context() is not correct when we are
      in presence of a top-most function-like macro invocation; in that
      case, that location should be the location of the closing parenthesis
      of the macro invocation.  Otherwise, if we are in presence of a a
      top-most object-like macro invocation then the location passed down
      to builtin_macro should be the location of the expansion point of the
      macro.
      
      That way, in the particular case of the input code above, the location
      received by builtin_macro() will always have line number 5.
      
      Boostrapped and tested on x86_64-unknown-linux-gnu against trunk.
      
      libcpp/ChangeLog:
      
      	* internal.h (cpp_reader::top_most_macro_node): New data member.
      	* macro.c (enter_macro_context): Pass the location of the end of
      	the top-most invocation of the function-like macro, or the
      	location of the expansion point of the top-most object-like macro.
      	(cpp_get_token_1): Store the top-most macro node in the new
      	pfile->top_most_macro_node data member.
      	(_cpp_pop_context): Clear the new cpp_reader::top_most_macro_node
      	data member.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.dg/cpp/builtin-macro-1.c: New test case.
      
      Signed-off-by: Dodji Seketeli <dodji@redhat.com>
      
      From-SVN: r220367
      Dodji Seketeli committed
  30. 02 Feb, 2015 1 commit
  31. 30 Jan, 2015 1 commit