1. 13 Oct, 2015 1 commit
    • [PATCH 1/9] ENABLE_CHECKING refactoring · 179b8d05
      [PATCH 1/9] ENABLE_CHECKING refactoring
      gcc/ChangeLog:
      
      2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>
      
      	* common.opt: Add flag_checking.
      	* system.h (CHECKING_P): Define.
      
      libcpp/ChangeLog:
      
      2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>
      
      	* system.h (CHECKING_P, gcc_checking_assert): Define.
      
      From-SVN: r228787
      Mikhail Maltsev committed
  2. 08 Oct, 2015 1 commit
  3. 21 Sep, 2015 1 commit
    • Handle lines encoded into several maps in linemap_position_for_loc_and_offset · 87b470b3
      linemap_position_for_loc_and_offset() tries to generate a location_t
      encoding a column offset from the current location, for example, point
      to a certain character inside a string. This is trivial to do when the
      new location "fits within" the map of the original location. However,
      it may happen that the (long) line corresponding to the original
      location is encoded in several maps, thus the new location should
      actually be encoded in a subsequent map from the original location.
      This patch detects this case and adjusts the map correspondingly.
      
      (This shows that the line-map representation is quite wasteful in this
      case, because line-maps always start at column 0. That is, map[0]
      highest location may encode up to line 8 column 80, then
      map[1]->start_location starts encoding at line 8 column 0. Thus, there
      are two location_t values that point to the same source location.)
      
      libcpp/ChangeLog:
      
      2015-09-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR c/66415
      	* line-map.c (linemap_position_for_loc_and_offset): Handle the
      	case of long lines encoded in multiple maps.
      
      gcc/testsuite/ChangeLog:
      
      2015-09-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR c/66415
      	* gcc.dg/cpp/pr66415-1.c: Test column number.
      
      From-SVN: r227975
      Manuel López-Ibáñez committed
  4. 07 Sep, 2015 1 commit
  5. 07 Aug, 2015 1 commit
    • Makefile.def (libiconv): Define bootstrap=true. · bf5372e7
      2015-08-06  Yaakov Selkowitz  <yselkowi@redhat.com>
      
      	* Makefile.def (libiconv): Define bootstrap=true.
      	Mark pdf/html/info as missing.
      	(configure-gcc): Depend on all-libiconv.
      	(all-gcc): Ditto.
      	(configure-libcpp): Ditto.
      	(all-libcpp): Ditto.
      	(configure-intl): Ditto.
      	(all-intl): Ditto.
      	* Makefile.in: Regenerate.
      
      intl/
      	* configure: Reflects renaming of configure.in to configure.ac
      
      libcpp/
      	* configure: Regenerate.
      
      gcc/
      	* configure.ac: Define LIBICONV_DEP with in-tree libiconv.
      	* configure: Regenerate.
      
      From-SVN: r226712
      Yaakov Selkowitz committed
  6. 31 Jul, 2015 1 commit
  7. 24 Jul, 2015 1 commit
  8. 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
  9. 03 Jul, 2015 1 commit
  10. 02 Jul, 2015 2 commits
  11. 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
  12. 08 Jun, 2015 1 commit
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 09 May, 2015 1 commit
  19. 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
  20. 01 May, 2015 1 commit
  21. 30 Apr, 2015 1 commit
  22. 13 Apr, 2015 1 commit
  23. 12 Apr, 2015 1 commit
  24. 10 Apr, 2015 2 commits
  25. 09 Apr, 2015 1 commit
  26. 07 Apr, 2015 2 commits
  27. 06 Apr, 2015 1 commit
  28. 02 Apr, 2015 1 commit
  29. 24 Mar, 2015 1 commit
  30. 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
  31. 17 Mar, 2015 1 commit