Commit Graph

665 Commits

Author SHA1 Message Date
Jakub Jelinek c04babd9df libcpp: Fix ICEs on __has_include syntax errors [PR93545]
Some of the following testcases ICE, because one of the cpp_get_token
calls in builtin_has_include reads the CPP_EOF token but the caller isn't
aware that CPP_EOF has been reached and will do another cpp_get_token.
get_token_no_padding is something that is use by the
has_attribute/has_builtin callbacks, which will first peek and will not
consume CPP_EOF (but will consume other tokens).  The !SEEN_EOL ()
check on the other side doesn't work anymore and isn't really needed,
as we don't consume the EOF.  The change adds one further error to the
pr88974.c testcase, if we wanted just one error per __has_include,
we could add some boolean whether we've emitted errors already and
only emit the first one we encounter (not implemented).

2020-02-04  Jakub Jelinek  <jakub@redhat.com>

	PR preprocessor/93545
	* macro.c (cpp_get_token_no_padding): New function.
	(builtin_has_include): Use it instead of cpp_get_token.  Don't check
	SEEN_EOL.

	* c-c++-common/cpp/pr88974.c: Expect another diagnostics during error
	recovery.
	* c-c++-common/cpp/pr93545-1.c: New test.
	* c-c++-common/cpp/pr93545-2.c: New test.
	* c-c++-common/cpp/pr93545-3.c: New test.
	* c-c++-common/cpp/pr93545-4.c: New test.
2020-02-04 13:38:16 +01:00
Andrew Burgess 20fa702b32 Fixes after recent configure changes relating to static libraries
This commit:

  commit e7c26e04b2 (tjteru/master)
  Date:   Wed Jan 22 14:54:26 2020 +0000

      gcc: Add new configure options to allow static libraries to be selected

contains a couple of issues.  First I failed to correctly regenerate
all of the configure files it should have done.  Second, there was a
mistake in lib-link.m4, one of the conditions didn't use pure sh
syntax, I wrote this:

  if x$lib_type = xauto || x$lib_type = xshared; then

When I should have written this:

  if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then

These issues were raised on the mailing list in these messages:

  https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01827.html
  https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01921.html

config/ChangeLog:

	* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Update shell syntax.

gcc/ChangeLog:

	* configure: Regenerate.

intl/ChangeLog:

	* configure: Regenerate.

libcpp/ChangeLog:

	* configure: Regenerate.

libstdc++-v3/ChangeLog:

	* configure: Regenerate.
2020-02-01 00:34:28 +00:00
Nathan Sidwell 3d056cbfb3 preprocessor: Make __has_include a builtin macro [PR93452]
The clever hack of '#define __has_include __has_include' breaks -dD
and -fdirectives-only, because that emits definitions.  This turns
__has_include into a proper builtin macro.  Thus it's never emitted
via -dD, and because use outside of directive processing is undefined,
we can just expand it anywhere.

	PR preprocessor/93452
	* internal.h (struct spec_nodes): Drop n__has_include{,_next}.
	* directives.c (lex_macro_node): Don't check __has_include redef.
	* expr.c (eval_token): Drop __has_include eval.
	(parse_has_include): Move to ...
	* macro.c (builtin_has_include): ... here.
	(_cpp_builtin_macro_text): Eval __has_include{,_next}.
	* include/cpplib.h (enum cpp_builtin_type): Add BT_HAS_INCLUDE{,_NEXT}.
	* init.c (builtin_array): Add them.
	(cpp_init_builtins): Drop __has_include{,_next} init here ...
	* pch.c (cpp_read_state): ... and here.
	* traditional.c (enum ls): Drop has_include states ...
	(_cpp_scan_out_logical_line): ... and here.
2020-01-28 08:02:17 -08:00
Andrew Burgess e7c26e04b2 gcc: Add new configure options to allow static libraries to be selected
The motivation behind this change is to make it easier for a user to
link against static libraries on a target where dynamic libraries are
the default library type (for example GNU/Linux).

Further, my motivation is really for linking libraries into GDB,
however, the binutils-gdb/config/ directory is a copy of gcc/config/
so changes for GDB need to be approved by the GCC project first.

After making this change in the gcc/config/ directory I've run
autoreconf on all of the configure scripts in the GCC tree and a
couple have been updated, so I'll use one of these to describe what my
change does.

Consider libcpp, this library links against libiconv.  Currently if
the user builds on a system with both static and dynamic libiconv
installed then autotools will pick up the dynamic libiconv by
default.  This is almost certainly the right thing to do.

However, if the user wants to link against static libiconv then things
are a little harder, they could remove the dynamic libiconv from their
system, but this is probably a bad idea (other things might depend on
that library), or the user can build their own version of libiconv,
install it into a unique prefix, and then configure gcc using the
--with-libiconv-prefix=DIR flag.  This works fine, but is somewhat
annoying, the static library available, I just can't get autotools to
use it.

My change then adds a new flag --with-libiconv-type=TYPE, where type
is either auto, static, or shared.  The default auto, ensures we keep
the existing behaviour unchanged.

If the user configures with --with-libiconv-type=static then the
configure script will ignore any dynamic libiconv it finds, and will
only look for a static libiconv, if no static libiconv is found then
the configure will continue as though there is no libiconv at all
available.

Similarly a user can specify --with-libiconv-type=shared and force the
use of shared libiconv, any static libiconv will be ignored.

As I've implemented this change within the AC_LIB_LINKFLAGS_BODY macro
then only libraries configured using the AC_LIB_LINKFLAGS or
AC_LIB_HAVE_LINKFLAGS macros will gain the new configure flag.

If this is accepted into GCC then there will be follow on patches for
binutils and GDB to regenerate some configure scripts in those
projects.

For GCC only two configure scripts needed updated after this commit,
libcpp and libstdc++-v3, both of which link against libiconv.

config/ChangeLog:

	* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Add new
	--with-libXXX-type=... option.  Use this to guide the selection of
	either a shared library or a static library.

libcpp/ChangeLog:

	* configure: Regenerate.

libstdc++-v3/ChangeLog:

	* configure: Regenerate.
2020-01-27 22:02:35 +00:00
Nathan Sidwell a1f6eff20e Remove bogus __has_include controlling macro
I noticed, but ignored this code when addressing p80005, but having
fixed up defined(X) on the modules branch, I could see where it came
from, and it's obviously wrong as we've just pulled out a string
contant from the token.

	* expr.c (parse_has_include): Remove bogus controlling macro code.
2020-01-24 04:19:36 -08:00
Nathan Sidwell ad1a3914ae [PR 80005] Fix __has_include
__has_include is funky in that it is macro-like from the POV of #ifdef and
friends, but lexes its parenthesize argument #include-like.  We were
failing the second part of that, because we used a forwarding macro to an
internal name, and hence always lexed the argument in macro-parameter
context.  We componded that by not setting the right flag when lexing, so
it didn't even know.  Mostly users got lucky.

This reimplements the handline.
1) Remove the forwarding, but declare object-like macros that
expand to themselves.  This satisfies the #ifdef requirement

2) Correctly set angled_brackets when lexing the parameter.  This tells
the lexer (a) <...> is a header name and (b) "..." is too (not a string).

3) Remove the in__has_include lexer state, just tell find_file that that's
what's happenning, so it doesn't emit an error.

We lose the (undocumented) ability to #undef __has_include.  That may well
have been an accident of implementation.  There are no tests for it.

We gain __has_include behaviour for all users of the preprocessors -- not
just the C-family ones that defined a forwarding macro.

	libcpp/
	PR preprocessor/80005
	* include/cpplib.h (BT_HAS_ATTRIBUTE): Fix comment.
	* internal.h (struct lexer_state): Delete in__has_include field.
	(struct spec_nodes): Rename n__has_include{,_next}__ fields.
	(_cpp_defined_macro_p): New.
	(_cpp_find_file): Add has_include parm.
	* directives.c (lex_macro_node): Combine defined,
	__has_inline{,_next} checking.
	(do_ifdef, do_ifndef): Use _cpp_defined_macro_p.
	(_cpp_init_directives): Refactor.
	* expr.c (parse_defined): Use _cpp_defined_macro_p.
	(eval_token): Adjust parse_has_include calls.
	(parse_has_include): Add OP parameter.  Reimplement.
	* files.c (_cpp_find_file): Add HAS_INCLUDE parm.  Use it to
	inhibit error message.
	(_cpp_stack_include): Adjust _cpp_find_file call.
	(_cpp_fake_include, _cpp_compare_file_date): Likewise.
	(open_file_failed): Remove in__has_include check.
	(_cpp_has_header): Adjust _cpp_find_file call.
	* identifiers.c (_cpp_init_hashtable): Don't init
	__has_include{,_next} here ...
	* init.c (cpp_init_builtins): ... init them here.  Define as
	macros.
	(cpp_read_main_file): Adjust _cpp_find_file call.
	* pch.c (cpp_read_state): Adjust __has_include{,_next} access.
	* traditional.c (_cpp_scan_out_locgical_line): Likewise.

	gcc/c-family/
	PR preprocessor/80005
	* c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.

	gcc/testsuite/
	PR preprocessor/80005
	* g++.dg/cpp1y/feat-cxx14.C: Adjust.
	* g++.dg/cpp1z/feat-cxx17.C: Adjust.
	* g++.dg/cpp2a/feat-cxx2a.C: Adjust.
	* g++.dg/cpp/pr80005.C: New.
2020-01-20 05:39:59 -08:00
Nathan Sidwell bf09d886a4 [PR93306] Short-circuit has_include
the preprocessor evaluator has a skip_eval counter, but we weren't
checking it after parsing has_include(foo), but before looking for
foo.  Resulting in unnecessary io for 'FALSE_COND && has_include <foo>'

	PR preprocessor/93306
	* expr.c (parse_has_include): Refactor.  Check skip_eval before
	looking.
2020-01-17 05:44:30 -08:00
David Malcolm 4bc1899b2e Add diagnostic paths
This patch adds support for associating a "diagnostic_path" with a
diagnostic: a sequence of events predicted by the compiler that leads to
the problem occurring, with their locations in the user's source,
text descriptions, and stack information (for handling interprocedural
paths).

For example, the following (hypothetical) error has a 3-event
intraprocedural path:

test.c: In function 'demo':
test.c:29:5: error: passing NULL as argument 1 to 'PyList_Append' which
  requires a non-NULL parameter
   29 |     PyList_Append(list, item);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
  'demo': events 1-3
     |
     |   25 |   list = PyList_New(0);
     |      |          ^~~~~~~~~~~~~
     |      |          |
     |      |          (1) when 'PyList_New' fails, returning NULL
     |   26 |
     |   27 |   for (i = 0; i < count; i++) {
     |      |   ~~~
     |      |   |
     |      |   (2) when 'i < count'
     |   28 |     item = PyLong_FromLong(random());
     |   29 |     PyList_Append(list, item);
     |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~
     |      |     |
     |      |     (3) when calling 'PyList_Append', passing NULL from (1) as argument 1
     |

The patch adds a new "%@" format code for printing event IDs, so that
in the above, the description of event (3) mentions event (1), showing
the user where the bogus NULL value comes from (the event IDs are
colorized to draw the user's attention to them).

There is a separation between data vs presentation: the above shows how
the diagnostic-printing code has consolidated the path into a single run
of events, since all the events are near each other and within the same
function; more complicated examples (such as interprocedural paths)
might be printed as multiple runs of events.

Examples of how interprocedural paths are printed can be seen in the
test suite (which uses a plugin to exercise the code without relying
on specific warnings using this functionality).

Other output formats include
- JSON,
- printing each event as a separate "note", and
- to not emit paths.

gcc/ChangeLog:
	* Makefile.in (OBJS): Add tree-diagnostic-path.o.
	* common.opt (fdiagnostics-path-format=): New option.
	(diagnostic_path_format): New enum.
	(fdiagnostics-show-path-depths): New option.
	* coretypes.h (diagnostic_event_id_t): New forward decl.
	* diagnostic-color.c (color_dict): Add "path".
	* diagnostic-event-id.h: New file.
	* diagnostic-format-json.cc (json_from_expanded_location): Make
	non-static.
	(json_end_diagnostic): Call context->make_json_for_path if it
	exists and the diagnostic has a path.
	(diagnostic_output_format_init): Clear context->print_path.
	* diagnostic-path.h: New file.
	* diagnostic-show-locus.c (colorizer::set_range): Special-case
	when printing a run of events in a diagnostic_path so that they
	all get the same color.
	(layout::m_diagnostic_path_p): New field.
	(layout::layout): Initialize it.
	(layout::print_any_labels): Don't colorize the label text for an
	event in a diagnostic_path.
	(gcc_rich_location::add_location_if_nearby): Add
	"restrict_to_current_line_spans" and "label" params.  Pass the
	former to layout.maybe_add_location_range; pass the latter
	when calling add_range.
	* diagnostic.c: Include "diagnostic-path.h".
	(diagnostic_initialize): Initialize context->path_format and
	context->show_path_depths.
	(diagnostic_show_any_path): New function.
	(diagnostic_path::interprocedural_p): New function.
	(diagnostic_report_diagnostic): Call diagnostic_show_any_path.
	(simple_diagnostic_path::num_events): New function.
	(simple_diagnostic_path::get_event): New function.
	(simple_diagnostic_path::add_event): New function.
	(simple_diagnostic_event::simple_diagnostic_event): New ctor.
	(simple_diagnostic_event::~simple_diagnostic_event): New dtor.
	(debug): New overload taking a diagnostic_path *.
	* diagnostic.def (DK_DIAGNOSTIC_PATH): New.
	* diagnostic.h (enum diagnostic_path_format): New enum.
	(json::value): New forward decl.
	(diagnostic_context::path_format): New field.
	(diagnostic_context::show_path_depths): New field.
	(diagnostic_context::print_path): New callback field.
	(diagnostic_context::make_json_for_path): New callback field.
	(diagnostic_show_any_path): New decl.
	(json_from_expanded_location): New decl.
	* doc/invoke.texi (-fdiagnostics-path-format=): New option.
	(-fdiagnostics-show-path-depths): New option.
	(-fdiagnostics-color): Add "path" to description of default
	GCC_COLORS; describe it.
	(-fdiagnostics-format=json): Document how diagnostic paths are
	represented in the JSON output format.
	* gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
	Add optional params "restrict_to_current_line_spans" and "label".
	* opts.c (common_handle_option): Handle
	OPT_fdiagnostics_path_format_ and
	OPT_fdiagnostics_show_path_depths.
	* pretty-print.c: Include "diagnostic-event-id.h".
	(pp_format): Implement "%@" format code for printing
	diagnostic_event_id_t *.
	(selftest::test_pp_format): Add tests for "%@".
	* selftest-run-tests.c (selftest::run_tests): Call
	selftest::tree_diagnostic_path_cc_tests.
	* selftest.h (selftest::tree_diagnostic_path_cc_tests): New decl.
	* toplev.c (general_init): Initialize global_dc->path_format and
	global_dc->show_path_depths.
	* tree-diagnostic-path.cc: New file.
	* tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Make
	non-static.  Drop "diagnostic" param in favor of storing the
	original value of "where" and re-using it.
	(virt_loc_aware_diagnostic_finalizer): Update for dropped param of
	maybe_unwind_expanded_macro_loc.
	(tree_diagnostics_defaults): Initialize context->print_path and
	context->make_json_for_path.
	* tree-diagnostic.h (default_tree_diagnostic_path_printer): New
	decl.
	(default_tree_make_json_for_path): New decl.
	(maybe_unwind_expanded_macro_loc): New decl.

gcc/c-family/ChangeLog:
	* c-format.c (local_event_ptr_node): New.
	(PP_FORMAT_CHAR_TABLE): Add entry for "%@".
	(init_dynamic_diag_info): Initialize local_event_ptr_node.
	* c-format.h (T_EVENT_PTR): New define.

gcc/testsuite/ChangeLog:
	* gcc.dg/format/gcc_diag-10.c (diagnostic_event_id_t): New
	typedef.
	(test_diag): Add coverage of "%@".
	* gcc.dg/plugin/diagnostic-path-format-default.c: New test.
	* gcc.dg/plugin/diagnostic-path-format-inline-events-1.c: New test.
	* gcc.dg/plugin/diagnostic-path-format-inline-events-2.c: New test.
	* gcc.dg/plugin/diagnostic-path-format-inline-events-3.c: New test.
	* gcc.dg/plugin/diagnostic-path-format-none.c: New test.
	* gcc.dg/plugin/diagnostic-test-paths-1.c: New test.
	* gcc.dg/plugin/diagnostic-test-paths-2.c: New test.
	* gcc.dg/plugin/diagnostic-test-paths-3.c: New test.
	* gcc.dg/plugin/diagnostic-test-paths-4.c: New test.
	* gcc.dg/plugin/diagnostic_plugin_test_paths.c: New.
	* gcc.dg/plugin/plugin.exp: Add the new plugin and test cases.

libcpp/ChangeLog:
	* include/line-map.h (class diagnostic_path): New forward decl.
	(rich_location::get_path): New accessor.
	(rich_location::set_path): New function.
	(rich_location::m_path): New field.
	* line-map.c (rich_location::rich_location): Initialize m_path.

From-SVN: r280142
2020-01-10 21:22:12 +00:00
Jakub Jelinek 8d9254fc8a Update copyright years.
From-SVN: r279813
2020-01-01 12:51:42 +01:00
David Malcolm 6dd0c82021 Drop unused member from cpp_string_location_reader (PR preprocessor/92982)
libcpp/ChangeLog:
	PR preprocessor/92982
	* charset.c
	(cpp_string_location_reader::cpp_string_location_reader): Delete
	initialization of m_line_table.
	* include/cpplib.h (cpp_string_location_reader::m_line_table):
	Delete unused member.

From-SVN: r279541
2019-12-18 17:26:01 +00:00
Jakub Jelinek 937a778ea3 re PR preprocessor/92919 (invalid memory access in wide_str_to_charconst when running ucn2.C testcase (caught by hwasan))
PR preprocessor/92919
	* charset.c (wide_str_to_charconst): If str contains just the
	NUL terminator, punt quietly.

From-SVN: r279399
2019-12-14 23:18:53 +01:00
David Malcolm d68f5d458d Replace label_text ctor with "borrow" and "take"
libcpp's label_text class wraps a text buffer, along with a flag to
determine if it "owns" the buffer.

The existing ctor exposed this directly, but I found it difficult
to remember the sense of flag, so this patch hides the ctor, in
favor of static member functions "borrow" and "take", to make
the effect on ownership explicit in the name.

gcc/c-family/ChangeLog:
	* c-format.c (range_label_for_format_type_mismatch::get_text):
	Replace label_text ctor called with true with label_text::take.

gcc/c/ChangeLog:
	* c-objc-common.c (range_label_for_type_mismatch::get_text):
	Replace label_text ctor calls.

gcc/cp/ChangeLog:
	* error.c (range_label_for_type_mismatch::get_text): Replace
	label_text ctor calls with label_text::borrow.

gcc/ChangeLog:
	* gcc-rich-location.c
	(maybe_range_label_for_tree_type_mismatch::get_text): Replace
	label_text ctor call with label_text::borrow.
	* gcc-rich-location.h (text_range_label::get_text): Replace
	label_text ctor called with false with label_text::borrow.

libcpp/ChangeLog:
	* include/line-map.h (label_text::label_text): Make private.
	(label_text::borrow): New.
	(label_text::take): New.
	(label_text::take_or_copy): New.

From-SVN: r279153
2019-12-10 02:02:38 +00:00
Lewis Hyatt ee9256409f Byte vs column awareness for diagnostic-show-locus.c (PR 49973)
contrib/ChangeLog

2019-12-09  Lewis Hyatt  <lhyatt@gmail.com>

	PR preprocessor/49973
	* unicode/from_glibc/unicode_utils.py: Support script from
	glibc (commit 464cd3) to extract character widths from Unicode data
	files.
	* unicode/from_glibc/utf8_gen.py: Likewise.
	* unicode/UnicodeData.txt: Unicode v. 12.1.0 data file.
	* unicode/EastAsianWidth.txt: Likewise.
	* unicode/PropList.txt: Likewise.
	* unicode/gen_wcwidth.py: New utility to generate
	libcpp/generated_cpp_wcwidth.h with help from the glibc support
	scripts and the Unicode data files.
	* unicode/unicode-license.txt: Added.
	* unicode/README: New explanatory file.

libcpp/ChangeLog

2019-12-09  Lewis Hyatt  <lhyatt@gmail.com>

	PR preprocessor/49973
	* generated_cpp_wcwidth.h: New file generated by
	../contrib/unicode/gen_wcwidth.py, supports new cpp_wcwidth function.
	* charset.c (compute_next_display_width): New function to help
	implement display columns.
	(cpp_byte_column_to_display_column): Likewise.
	(cpp_display_column_to_byte_column): Likewise.
	(cpp_wcwidth): Likewise.
	* include/cpplib.h (cpp_byte_column_to_display_column): Declare.
	(cpp_display_column_to_byte_column): Declare.
	(cpp_wcwidth): Declare.
	(cpp_display_width): New function.

gcc/ChangeLog

2019-12-09  Lewis Hyatt  <lhyatt@gmail.com>

	PR preprocessor/49973
	* input.c (location_compute_display_column): New function to help with
	multibyte awareness in diagnostics.
	(test_cpp_utf8): New self-test.
	(input_c_tests): Call the new test.
	* input.h (location_compute_display_column): Declare.
	* diagnostic-show-locus.c: Pervasive changes to add multibyte awareness
	to all classes and functions.
	(enum column_unit): New enum.
	(class exploc_with_display_col): New class.
	(class layout_point): Convert m_column member to array m_columns[2].
	(layout_range::contains_point): Add col_unit argument.
	(test_layout_range_for_single_point): Pass new argument.
	(test_layout_range_for_single_line): Likewise.
	(test_layout_range_for_multiple_lines): Likewise.
	(line_bounds::convert_to_display_cols): New function.
	(layout::get_state_at_point): Add col_unit argument.
	(make_range): Use empty filename rather than dummy filename.
	(get_line_width_without_trailing_whitespace): Rename to...
	(get_line_bytes_without_trailing_whitespace): ...this.
	(test_get_line_width_without_trailing_whitespace): Rename to...
	(test_get_line_bytes_without_trailing_whitespace): ...this.
	(class layout): m_exploc changed to exploc_with_display_col from
	plain expanded_location.
	(layout::get_linenum_width): New accessor member function.
	(layout::get_x_offset_display): Likewise.
	(layout::calculate_linenum_width): New subroutine for the constuctor.
	(layout::calculate_x_offset_display): Likewise.
	(layout::layout): Use the new subroutines. Add multibyte awareness.
	(layout::print_source_line): Add multibyte awareness.
	(layout::print_line): Likewise.
	(layout::print_annotation_line): Likewise.
	(line_label::line_label): Likewise.
	(layout::print_any_labels): Likewise.
	(layout::annotation_line_showed_range_p): Likewise.
	(get_printed_columns): Likewise.
	(class line_label): Rename m_length to m_display_width.
	(get_affected_columns): Rename to...
	(get_affected_range): ...this; add col_unit argument and multibyte
	awareness.
	(class correction): Add m_affected_bytes and m_display_cols
	members.  Rename m_len to m_byte_length for clarity.  Add multibyte
	awareness throughout.
	(correction::insertion_p): Add multibyte awareness.
	(correction::compute_display_cols): New function.
	(correction::ensure_terminated): Use new member name m_byte_length.
	(line_corrections::add_hint): Add multibyte awareness.
	(layout::print_trailing_fixits): Likewise.
	(layout::get_x_bound_for_row): Likewise.
	(test_one_liner_simple_caret_utf8): New self-test analogous to the one
	with _utf8 suffix removed, testing multibyte awareness.
	(test_one_liner_caret_and_range_utf8): Likewise.
	(test_one_liner_multiple_carets_and_ranges_utf8): Likewise.
	(test_one_liner_fixit_insert_before_utf8): Likewise.
	(test_one_liner_fixit_insert_after_utf8): Likewise.
	(test_one_liner_fixit_remove_utf8): Likewise.
	(test_one_liner_fixit_replace_utf8): Likewise.
	(test_one_liner_fixit_replace_non_equal_range_utf8): Likewise.
	(test_one_liner_fixit_replace_equal_secondary_range_utf8): Likewise.
	(test_one_liner_fixit_validation_adhoc_locations_utf8): Likewise.
	(test_one_liner_many_fixits_1_utf8): Likewise.
	(test_one_liner_many_fixits_2_utf8): Likewise.
	(test_one_liner_labels_utf8): Likewise.
	(test_diagnostic_show_locus_one_liner_utf8): Likewise.
	(test_overlapped_fixit_printing_utf8): Likewise.
	(test_overlapped_fixit_printing): Adapt for changes to
	get_affected_columns, get_printed_columns and class corrections.
	(test_overlapped_fixit_printing_2): Likewise.
	(test_linenum_sep): New constant.
	(test_left_margin): Likewise.
	(test_offset_impl): Helper function for new test.
	(test_layout_x_offset_display_utf8): New test.
	(diagnostic_show_locus_c_tests): Call new tests.

gcc/testsuite/ChangeLog:

2019-12-09  Lewis Hyatt  <lhyatt@gmail.com>

	PR preprocessor/49973
	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
	(test_show_locus): Tweak so that expected output is the same as
	before the diagnostic-show-locus.c changes.
	* gcc.dg/cpp/pr66415-1.c: Likewise.

From-SVN: r279137
2019-12-09 20:03:47 +00:00
Joseph Myers 7c5890cc0a Support UTF-8 character constants for C2x.
C2x adds u8'' character constants to C.  This patch adds the
corresponding GCC support.

Most of the support was already present for C++ and just needed
enabling for C2x.  However, in C2x these constants have type unsigned
char, which required corresponding adjustments in the compiler and the
preprocessor to give them that type for C.

For C, it seems clear to me that having type unsigned char means the
constants are unsigned in the preprocessor (and thus treated as having
type uintmax_t in #if conditionals), so this patch implements that.  I
included a conditional in the libcpp change to avoid affecting
signedness for C++, but I'm not sure if in fact these constants should
also be unsigned in the preprocessor for C++ in which case that
!CPP_OPTION (pfile, cplusplus) conditional would not be needed.

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

gcc/c:
	* c-parser.c (c_parser_postfix_expression)
	(c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
	* gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.

gcc/c-family:
	* c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
	char for C.

gcc/testsuite:
	* gcc.dg/c11-utf8char-1.c, gcc.dg/c2x-utf8char-1.c,
	gcc.dg/c2x-utf8char-2.c, gcc.dg/c2x-utf8char-3.c,
	gcc.dg/gnu2x-utf8char-1.c: New tests.

libcpp:
	* charset.c (narrow_str_to_charconst): Make CPP_UTF8CHAR constants
	unsigned for C.
	* init.c (lang_defaults): Set utf8_char_literals for GNUC2X and
	STDC2X.

From-SVN: r278265
2019-11-14 20:18:33 +00:00
Jakub Jelinek 2c03d73667 PR c++/91370 - Implement P1041R4 and P1139R2 - Stronger Unicode reqs
PR c++/91370 - Implement P1041R4 and P1139R2 - Stronger Unicode reqs
	* charset.c (narrow_str_to_charconst): Add TYPE argument.  For
	CPP_UTF8CHAR diagnose whenever number of chars is > 1, using
	CPP_DL_ERROR instead of CPP_DL_WARNING.
	(wide_str_to_charconst): For CPP_CHAR16 or CPP_CHAR32, use
	CPP_DL_ERROR instead of CPP_DL_WARNING when multiple char16_t
	or char32_t chars are needed.
	(cpp_interpret_charconst): Adjust narrow_str_to_charconst caller.

	* g++.dg/cpp1z/utf8-neg.C: Expect errors rather than -Wmultichar
	warnings.
	* g++.dg/ext/utf16-4.C: Expect errors rather than warnings.
	* g++.dg/ext/utf32-4.C: Likewise.
	* g++.dg/cpp2a/ucn2.C: New test.

From-SVN: r277929
2019-11-07 21:24:38 +01:00
Jason Merrill b7689b962d Implement C++20 operator<=>.
There are three major pieces to this support: scalar operator<=>,
synthesis of comparison operators, and rewritten/reversed overload
resolution (e.g. a < b becomes 0 > b <=> a).

Unlike other defaulted functions, where we use synthesized_method_walk to
semi-simulate what the definition of the function will be like, this patch
determines the characteristics of a comparison operator by trying to define
it.

My handling of non-dependent rewritten operators in templates can still use
some work: build_min_non_dep_op_overload can't understand the rewrites and
crashes, so I'm avoiding it for now by clearing *overload.  This means we'll
do name lookup again at instantiation time, which can incorrectly mean a
different result.  I'll poke at this more in stage 3.

I'm leaving out a fourth section ("strong structural equality") even though
I've implemented it, because it seems likely to change radically tomorrow.

Thanks to Tim van Deurzen and Jakub for implementing lexing of the <=>
operator, and Jonathan for the initial <compare> header.

gcc/cp/
	* cp-tree.h (struct lang_decl_fn): Add maybe_deleted bitfield.
	(DECL_MAYBE_DELETED): New.
	(enum special_function_kind): Add sfk_comparison.
	(LOOKUP_REWRITTEN, LOOKUP_REVERSED): New.
	* call.c (struct z_candidate): Add rewritten and reversed methods.
	(add_builtin_candidate): Handle SPACESHIP_EXPR.
	(add_builtin_candidates): Likewise.
	(add_candidates): Don't add a reversed candidate if the parms are
	the same.
	(add_operator_candidates): Split out from build_new_op_1.  Handle
	rewritten and reversed candidates.
	(add_candidate): Swap conversions of reversed candidate.
	(build_new_op_1): Swap them back.  Build a second operation for
	rewritten candidates.
	(extract_call_expr): Handle rewritten calls.
	(same_fn_or_template): New.
	(joust): Handle rewritten and reversed candidates.
	* class.c (add_implicitly_declared_members): Add implicit op==.
	(classtype_has_op, classtype_has_defaulted_op): New.
	* constexpr.c (cxx_eval_binary_expression): Handle SPACESHIP_EXPR.
	(cxx_eval_constant_expression, potential_constant_expression_1):
	Likewise.
	* cp-gimplify.c (genericize_spaceship): New.
	(cp_genericize_r): Use it.
	* cp-objcp-common.c (cp_common_init_ts): Handle SPACESHIP_EXPR.
	* decl.c (finish_function): Handle deleted function.
	* decl2.c (grokfield): SET_DECL_FRIEND_CONTEXT on defaulted friend.
	(mark_used): Check DECL_MAYBE_DELETED.  Remove assumption that
	defaulted functions are non-static members.
	* error.c (dump_expr): Handle SPACESHIP_EXPR.
	* method.c (type_has_trivial_fn): False for sfk_comparison.
	(enum comp_cat_tag, struct comp_cat_info_t): New types.
	(comp_cat_cache): New array variable.
	(lookup_comparison_result, lookup_comparison_category)
	(is_cat, cat_tag_for, spaceship_comp_cat)
	(spaceship_type, genericize_spaceship)
	(common_comparison_type, early_check_defaulted_comparison)
	(comp_info, build_comparison_op): New.
	(synthesize_method): Handle sfk_comparison.  Handle deleted.
	(get_defaulted_eh_spec, maybe_explain_implicit_delete)
	(explain_implicit_non_constexpr, implicitly_declare_fn)
	(defaulted_late_check, defaultable_fn_check): Handle sfk_comparison.
	* name-lookup.c (get_std_name_hint): Add comparison categories.
	* tree.c (special_function_p): Add sfk_comparison.
	* typeck.c (cp_build_binary_op): Handle SPACESHIP_EXPR.

2019-11-05  Tim van Deurzen  <tim@kompiler.org>

	Add new tree code for the spaceship operator.
gcc/cp/
	* cp-tree.def: Add new tree code.
	* operators.def: New binary operator.
	* parser.c: Add new token and tree code.
libcpp/
	* cpplib.h: Add spaceship operator for C++.
	* lex.c: Implement conditional lexing of spaceship operator for C++20.

2019-11-05  Jonathan Wakely  <jwakely@redhat.com>

libstdc++-v3/
	* libsupc++/compare: New header.
	* libsupc++/Makefile.am (std_HEADERS): Add compare.
	* include/std/version: Define __cpp_lib_three_way_comparison.
	* include/std/functional: #include <compare>.

From-SVN: r277865
2019-11-05 18:56:18 -05:00
Jakub Jelinek aa23e73b1a re PR preprocessor/92296 (internal compiler error: Segmentation fault #pragma push_macro("__LINE__"))
PR preprocessor/92296
	* internal.h (struct def_pragma_macro): Add is_builtin bitfield.
	(_cpp_restore_special_builtin): Declare.
	* init.c (_cpp_restore_special_builtin): New function.
	* directives.c (do_pragma_push_macro): For NT_BUILTIN_MACRO
	set is_builtin and don't try to grab definition.
	(cpp_pop_definition): Use _cpp_restore_special_builtin to restore
	builtin macros.

	* c-c++-common/cpp/pr92296-1.c: New test.
	* c-c++-common/cpp/pr92296-2.c: New test.

From-SVN: r277685
2019-10-31 18:38:44 +01:00
Nathan Sidwell 9158f0ba97 [linemap PATCH] Constify lookup
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01080.html
looking up a line map takes a non-constant line_maps object, which is confusing.
This makes the caching fields mutable, so permits a constant object, as one might expect for a lookup.

	* include/line-map.h (struct maps_info_ordinary): Make cache
	mutable.
	(struct maps_info_macro): Likewise.
	(LINEMAPS_CACHE): Remove non-ref accessor. Constify ref accessor.
	(LINEMAPS_ORDINARY_CACHE, LINEMAPS_MACRO_CACHE): Likewise.
	(LINEMAPS_ORDINARY_MAP_AT, LINEMAPS_MACRO_MAP_AT): Use
	LINEMAPS_USED and LINEMAPS_MAP_AT.
	(linemap_lookup): Constify line_map arg.
	linemap.c (linemap_ordinary_map_lookup, linemap_macro_map_lookup):
	Constify line_map arg.

From-SVN: r276994
2019-10-15 12:03:04 +00:00
Joseph Myers 175a85b297 Support decimal floating-point constants in C2x.
ISO C2x adds decimal floating point as an optional standard feature.
This patch accordingly makes GCC accept DFP constants (DF, DD, DL, df,
dd, dl suffixes) in strict C2X mode, with a pedwarn-if-pedantic for
older standards and a warning with -Wc11-c2x-compat even in C2x mode
(which in turn requires -Wc11-c2x-compat to be newly passed through to
libcpp).

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

gcc/c-family:
	* c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
	CppReason(CPP_W_C11_C2X_COMPAT).

gcc/testsuite:
	* gcc.dg/dfp/c11-constants-1.c, gcc.dg/dfp/c11-constants-2.c,
	gcc.dg/dfp/c2x-constants-1.c, gcc.dg/dfp/c2x-constants-2.c: New
	tests.
	* gcc.dg/dfp/constants-pedantic.c: Use -std=gnu17 explicitly.
	Update expected diagnostics.

libcpp:
	* include/cpplib.h (struct cpp_options): Add dfp_constants and
	cpp_warn_c11_c2x_compat.
	(enum cpp_warning_reason): Add CPP_W_C11_C2X_COMPAT.
	* init.c (struct lang_flags): Add dfp_constants.
	(lang_defaults): Set dfp_constants to 1 for GNUC2X and STDC2X and
	0 for other languages.
	(cpp_set_lang): Set dfp_constants from language.
	(cpp_create_reader): Set cpp_warn_c11_c2x_compat to -1.
	* expr.c (interpret_float_suffix): Mention DFP constants as C2X in
	comment.
	(cpp_classify_number): Do not diagnose DFP constants for languages
	setting dfp_constants, unless cpp_warn_c11_c2x_compat.

From-SVN: r276908
2019-10-11 23:22:52 +01:00
Nathan Sidwell 924b927658 [preprocessor/91991] column location overflow
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00371.html
	PR preprocessor/91991
	* line-map.c (linemap_line_start): Clear max_column_hint if we run
	out of locations.

From-SVN: r276596
2019-10-04 19:08:09 +00:00
Richard Biener 68710ac7da internal.h (enum include_type): Remove trailing comma.
2019-10-02  Richard Biener  <rguenther@suse.de>

	* internal.h (enum include_type): Remove trailing comma.

From-SVN: r276443
2019-10-02 10:22:05 +00:00
Joseph Myers 93313b94fe Handle :: tokens in C for C2x.
As part of adding [[]]-style attributes, C2x adds the token :: for use
in scoped attribute names.

This patch adds corresponding support for that token in C to GCC.  The
token is supported both for C2x and for older gnu* standards (on the
basis that extensions are normally supported in older gnu* versions;
people will expect to be able to use [[]] attributes, before C2x is
the default, without needing to use -std=gnu2x).

There are no cases in older C standards where the token : can be
followed by a token starting with : in syntactically valid sources;
the only cases the :: token could break in older standard C thus are
ones involving concatenation of pp-tokens where the result does not
end up as tokens (e.g., gets stringized).  In GNU C extensions, the
main case where :: might appear in existing sources is in asm
statements, and the C parser is thus made to handle it like two
consecutive : tokens, which the C++ parser already does.  A limited
test of various positionings of :: in asm statements is added to the
testsuite (in particular, to cover the syntax error when :: means too
many colons but a single : would be OK), but existing tests cover a
variety of styles there anyway.

Technically there are cases in Objective-C and OpenMP for which this
also changes how previously valid code is lexed: the objc-selector-arg
syntax allows multiple consecutive : tokens (although I don't think
they are particularly useful there), while OpenMP syntax includes
array section syntax such as [:] which, before :: was a token, could
also be written as [::> (there might be other OpenMP cases potentially
affected, I didn't check all the OpenMP syntax in detail).  I don't
think either of those cases affects the basis for supporting the ::
token in all -std=gnu* modes, or that there is any obvious need to
special-case handling of CPP_SCOPE tokens for those constructs the way
there is for asm statements.

cpp_avoid_paste, which determines when spaces need adding between
tokens in preprocessed output where there wouldn't otherwise be
whitespace between them (e.g. if stringized), already inserts space
between : and : unconditionally, rather than only for C++, so no
change is needed there (but a C2x test is added that such space is
indeed inserted).

Bootstrapped with no regressions on x86-64-pc-linux-gnu.

gcc/c:
	* c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
	CPP_COLON tokens.

gcc/testsuite:
	* gcc.dg/asm-scope-1.c, gcc.dg/cpp/c11-scope-1.c,
	gcc.dg/cpp/c17-scope-1.c, gcc.dg/cpp/c2x-scope-1.c,
	gcc.dg/cpp/c2x-scope-2.c, gcc.dg/cpp/c90-scope-1.c,
	gcc.dg/cpp/c94-scope-1.c, gcc.dg/cpp/c99-scope-1.c,
	gcc.dg/cpp/gnu11-scope-1.c, gcc.dg/cpp/gnu17-scope-1.c,
	gcc.dg/cpp/gnu89-scope-1.c, gcc.dg/cpp/gnu99-scope-1.c: New tests.

libcpp:
	* include/cpplib.h (struct cpp_options): Add member scope.
	* init.c (struct lang_flags, lang_defaults): Likewise.
	(cpp_set_lang): Set scope member of pfile.
	* lex.c (_cpp_lex_direct): Test CPP_OPTION (pfile, scope) not
	CPP_OPTION (pfile, cplusplus) for creating CPP_SCOPE tokens.

From-SVN: r276434
2019-10-02 01:08:40 +01:00
Eric Botcazou 0900e29cdb charset.c (UCS_LIMIT): New macro.
* charset.c (UCS_LIMIT): New macro.
	(ucn_valid_in_identifier): Use it instead of a hardcoded constant.
	(_cpp_valid_ucn): Issue a pedantic warning for UCNs larger than
	UCS_LIMIT outside of identifiers in C and in C++2a or later.

From-SVN: r276167
2019-09-26 21:43:51 +00:00
Lewis Hyatt 7d112d6670 Support extended characters in C/C++ identifiers (PR c/67224)
libcpp/ChangeLog
2019-09-19  Lewis Hyatt  <lhyatt@gmail.com>

	PR c/67224
	* charset.c (_cpp_valid_utf8): New function to help lex UTF-8 tokens.
	* internal.h (_cpp_valid_utf8): Declare.
	* lex.c (forms_identifier_p): Use it to recognize UTF-8 identifiers.
	(_cpp_lex_direct): Handle UTF-8 in identifiers and CPP_OTHER tokens.
	Do all work in "default" case to avoid slowing down typical code paths.
	Also handle $ and UCN in the default case for consistency.

gcc/Changelog
2019-09-19  Lewis Hyatt  <lhyatt@gmail.com>

	PR c/67224
	* doc/cpp.texi: Document support for extended characters in
	identifiers.
	* doc/cppopts.texi: Likewise.

gcc/testsuite/ChangeLog
2019-09-19  Lewis Hyatt  <lhyatt@gmail.com>

	PR c/67224
	* c-c++-common/cpp/ucnid-2011-1-utf8.c: New test.
	* g++.dg/cpp/ucnid-1-utf8.C: New test.
	* g++.dg/cpp/ucnid-2-utf8.C: New test.
	* g++.dg/cpp/ucnid-3-utf8.C: New test.
	* g++.dg/cpp/ucnid-4-utf8.C: New test.
	* g++.dg/other/ucnid-1-utf8.C: New test.
	* gcc.dg/cpp/ucnid-1-utf8.c: New test.
	* gcc.dg/cpp/ucnid-10-utf8.c: New test.
	* gcc.dg/cpp/ucnid-11-utf8.c: New test.
	* gcc.dg/cpp/ucnid-12-utf8.c: New test.
	* gcc.dg/cpp/ucnid-13-utf8.c: New test.
	* gcc.dg/cpp/ucnid-14-utf8.c: New test.
	* gcc.dg/cpp/ucnid-15-utf8.c: New test.
	* gcc.dg/cpp/ucnid-2-utf8.c: New test.
	* gcc.dg/cpp/ucnid-3-utf8.c: New test.
	* gcc.dg/cpp/ucnid-4-utf8.c: New test.
	* gcc.dg/cpp/ucnid-6-utf8.c: New test.
	* gcc.dg/cpp/ucnid-7-utf8.c: New test.
	* gcc.dg/cpp/ucnid-9-utf8.c: New test.
	* gcc.dg/ucnid-1-utf8.c: New test.
	* gcc.dg/ucnid-10-utf8.c: New test.
	* gcc.dg/ucnid-11-utf8.c: New test.
	* gcc.dg/ucnid-12-utf8.c: New test.
	* gcc.dg/ucnid-13-utf8.c: New test.
	* gcc.dg/ucnid-14-utf8.c: New test.
	* gcc.dg/ucnid-15-utf8.c: New test.
	* gcc.dg/ucnid-16-utf8.c: New test.
	* gcc.dg/ucnid-2-utf8.c: New test.
	* gcc.dg/ucnid-3-utf8.c: New test.
	* gcc.dg/ucnid-4-utf8.c: New test.
	* gcc.dg/ucnid-5-utf8.c: New test.
	* gcc.dg/ucnid-6-utf8.c: New test.
	* gcc.dg/ucnid-7-utf8.c: New test.
	* gcc.dg/ucnid-8-utf8.c: New test.
	* gcc.dg/ucnid-9-utf8.c: New test.

From-SVN: r275979
2019-09-19 20:56:11 +01:00
Nathan Sidwell 400b8274e6 [preprocessor] Popping "" file names
https://gcc.gnu.org/ml/gcc-patches/2019-08/msg02069.html
	New # semantics for popping to "" name.
	libcpp/
	* directives.c (do_linemarker): Popping to "" name means get the
	name from the include stack..

From-SVN: r275457
2019-09-06 12:54:19 +00:00
Nathan Sidwell 056f95ec95 [preprocessor/91639] #includes at EOF
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00280.html
	libcpp/
	PR preprocessor/91639
	* directives.c (do_include_common): Tell lexer we're a #include.
	* files.c (_cpp_stack_file): Lexer will have always incremented.
	* internal.h (struct cpp_context): Extend in_directive's
	semantics.
	* lex.c (_cpp_lex_direct): Increment line for final \n when lexing
	for an ISO #include.
	* line-map.c (linemap_line_start): Remember if we overflowed.

	gcc/testsuite/
	PR preprocessor/91639
	* c-c++-common/cpp/pr91639.c: New.
	* c-c++-common/cpp/pr91639-one.h: New.
	* c-c++-common/cpp/pr91639-two.h: New.

From-SVN: r275402
2019-09-05 11:23:48 +00:00
Ulrich Weigand 2f2aeda98f Remove Cell Broadband Engine SPU targets
From-SVN: r275343
2019-09-03 15:08:28 +00:00
Nathan Sidwell b0d11f1ed6 [preprocessor] Include stacking
https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01971.html
	* internal.h (enum include_type): Add IT_MAIN, IT_DIRECTIVE_HWM,
	IT_HEADER_HWM.
	(_cpp_stack_file): Take include_type, not a bool.
	* files.c (_cpp_find_file): Refactor to not hide an if inside a
	for conditional.
	(should_stack_file): Break apart to ...
	(is_known_idempotent_file, has_unique_contents): ... these.
	(_cpp_stack_file): Replace IMPORT boolean with include_type enum.
	Refactor to use new predicates.  Do linemap compensation here ...
	(_cpp_stack_include): ... not here.
	* init.c (cpp_read_main_file): Pass IT_MAIN to _cpp_stack_file.

From-SVN: r275034
2019-08-29 14:06:32 +00:00
Nathan Sidwell a0be978a82 [Preprocessor] small cleanups
https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01904.html
	* directives-only.c (_cpp_preprocess_dir_only): Use false, not
	zero for _cpp_handle_directive call.
	* directives.c (_cpp_handle_directive): Indented is bool.
	* files.c (struct _cpp_file): Make bools 1 bit bitfields.
	* internal.h (enum include_type): Reformat and comment.
	(struct cpp_buffer): Make flags 1 bit bitfields.
	(_cpp_handle_directive): Indented is bool.

From-SVN: r274999
2019-08-28 18:43:37 +00:00
Martin Sebor 6c1dae73cd PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to non-bugs
gcc/c/ChangeLog:

	PR c++/61339
	* c-decl.c: Change class-key from class to struct and vice versa
	to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
	* gimple-parser.c: Same.

gcc/c-family/ChangeLog:

	PR c++/61339
	* c-format.c (check_argument_type): Change class-key from class to
	struct and vice versa to match convention and avoid -Wclass-is-pod
	and -Wstruct-no-pod.
	* c-pretty-print.h: Same.

gcc/cp/ChangeLog:

	PR c++/61339
	* constexpr.c (cxx_eval_call_expression): Change class-key from class
	to struct and vice versa to match convention and avoid -Wclass-is-pod
	and -Wstruct-no-pod.
	* constraint.cc (get_concept_definition): Same.
	* cp-tree.h: Same.
	* cxx-pretty-print.h: Same.
	* error.c: Same.
	* logic.cc (term_list::replace): Same.
	* name-lookup.c (find_local_binding): Same.
	* pt.c (tsubst_binary_right_fold): Same.
	* search.c (field_accessor_p): Same.
	* semantics.c (expand_or_defer_fn): Same.

gcc/lto/ChangeLog:

	PR c++/61339
	* lto-dump.c: Change class-key from classi to struct and vice versa
	to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.

gcc/ChangeLog:

	PR c++/61339
	* align.h: Change class-key from class to struct and vice versa
	to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
	* alloc-pool.h: Same.
	* asan.c (shadow_mem_size): Same.
	* auto-profile.c: Same.
	* basic-block.h: Same.
	* bitmap.h: Same.
	* cfgexpand.c (set_rtl): Same.
	(expand_one_stack_var_at): Same.
	* cfghooks.h: Same.
	* cfgloop.h: Same.
	* cgraph.h: Same.
	* config/i386/i386.h: Same.
	* df-problems.c (df_print_bb_index): Same.
	* df-scan.c: Same.
	* df.h (df_single_use): Same.
	* diagnostic-show-locus.c (layout::print_annotation_line): Same.
	(layout::annotation_line_showed_range_p): Same.
	(get_printed_columns): Same.
	(correction::ensure_terminated): Same.
	(line_corrections::~line_corrections): Same.
	* dojump.h: Same.
	* dse.c: Same.
	* dump-context.h: Same.
	* dumpfile.h: Same.
	* dwarf2out.c: Same.
	* edit-context.c: Same.
	* fibonacci_heap.c (test_union_of_equal_heaps): Same.
	* flags.h: Same.
	* function.c (assign_stack_local): Same.
	* function.h: Same.
	* gcc.c: Same.
	* gcov.c (block_info::block_info): Same.
	* genattrtab.c: Same.
	* genextract.c: Same.
	* genmatch.c (comparison_code_p): Same.
	(id_base::id_base): Same.
	(decision_tree::print): Same.
	* genoutput.c: Same.
	* genpreds.c (write_one_predicate_function): Same.
	* genrecog.c (validate_pattern): Same.
	(find_operand_positions): Same.
	(optimize_subroutine_group): Same.
	(merge_pattern_transition::merge_pattern_transition): Same.
	(merge_pattern_info::merge_pattern_info): Same.
	(merge_state_result::merge_state_result): Same.
	(merge_into_state): Same.
	* gensupport.c: Same.
	* gensupport.h: Same.
	* ggc-common.c (init_ggc_heuristics): Same.
	* ggc-tests.c (test_union): Same.
	* gimple-loop-interchange.cc (dump_induction): Same.
	* gimple-loop-versioning.cc: Same.
	* gimple-match.h (gimple_match_cond::any_else): Same.
	* gimple-ssa-backprop.c: Same.
	* gimple-ssa-sprintf.c: Same.
	* gimple-ssa-store-merging.c (store_operand_info::store_operand_info): Same.
	(store_immediate_info::store_immediate_info): Same.
	(merged_store_group::apply_stores): Same.
	(get_location_for_stmts): Same.
	* gimple-ssa-strength-reduction.c: Same.
	* gimple-ssa-warn-alloca.c: Same.
	* gimple-ssa-warn-restrict.c (pass_wrestrict::execute): Same.
	* godump.c (go_type_decl): Same.
	* hash-map-tests.c (test_map_of_strings_to_int): Same.
	* hash-map.h: Same.
	* hash-set-tests.c (test_set_of_strings): Same.
	* hsa-brig.c: Same.
	* hsa-common.h: Same.
	* hsa-gen.c (transformable_switch_to_sbr_p): Same.
	* input.c (assert_loceq): Same.
	* input.h: Same.
	* ipa-cp.c: Same.
	* ipa-devirt.c (possible_polymorphic_call_targets_1): Same.
	* ipa-fnsummary.h: Same.
	* ipa-inline.h: Same.
	* ipa-prop.h: Same.
	* ipa-split.c (visit_bb): Same.
	* ira-int.h (minmax_set_iter_next): Same.
	* loop-invariant.c: Same.
	* loop-iv.c: Same.
	* lra-eliminations.c: Same.
	* lra-int.h: Same.
	* lra-lives.c (mark_regno_dead): Same.
	* lra-remat.c: Same.
	* lra-spills.c: Same.
	* lto-streamer.h: Same.
	* mem-stats.h: Same.
	* omp-grid.c (omp_grid_lastprivate_predicate): Same.
	* omp-low.c (omp_clause_aligned_alignment): Same.
	* optabs-query.h (get_vcond_eq_icode): Same.
	* optabs.h: Same.
	* opts.c (wrap_help): Same.
	* poly-int.h: Same.
	* predict.c (predict_paths_leading_to_edge): Same.
	* pretty-print.h: Same.
	* profile-count.h: Same.
	* read-md.h: Same.
	* read-rtl-function.c: Same.
	* ree.c: Same.
	* reginfo.c: Same.
	* regrename.c: Same.
	* regrename.h: Same.
	* reload.h: Same.
	* rtl-iter.h: Same.
	* rtl.h (costs_add_n_insns): Same.
	* sanopt.c: Same.
	* sched-int.h: Same.
	* sel-sched-ir.h: Same.
	* selftest.h: Same.
	* sese.h (vec_find): Same.
	* stmt.c: Same.
	* target-globals.h: Same.
	* tree-affine.c (aff_combination_find_elt): Same.
	* tree-affine.h: Same.
	* tree-data-ref.h: Same.
	* tree-outof-ssa.c (ssa_is_replaceable_p): Same.
	* tree-predcom.c: Same.
	* tree-scalar-evolution.c (find_var_scev_info): Same.
	* tree-ssa-alias.h: Same.
	* tree-ssa-ccp.c: Same.
	* tree-ssa-coalesce.c (ssa_conflicts_dump): Same.
	* tree-ssa-loop-im.c (for_all_locs_in_loop): Same.
	(rewrite_mem_refs): Same.
	(execute_sm_if_changed): Same.
	(hoist_memory_references): Same.
	* tree-ssa-loop-ivopts.c (operator<=): Same.
	* tree-ssa-loop.h: Same.
	* tree-ssa-pre.c (get_or_alloc_expr_for_name): Same.
	* tree-ssa-structalias.c: Same.
	* tree-switch-conversion.h (cluster::cluster): Same.
	(simple_cluster::simple_cluster): Same.
	* tree-vect-patterns.c (type_conversion_p): Same.
	* tree-vectorizer.c (dump_stmt_cost): Same.
	* tree-vectorizer.h (loop_vec_info_for_loop): Same.
	* tree.c (protected_set_expr_location): Same.
	* tree.h (desired_pro_or_demotion_p): Same.
	(fndecl_built_in_p): Same.
	* unique-ptr-tests.cc: Same.
	* var-tracking.c (delete_variable_part): Same.
	* varasm.c (assemble_real): Same.
	(tree_output_constant_def): Same.
	* vec.c: Same.
	* wide-int-bitmask.h: Same.
	* wide-int.h (decompose): Same.

From-SVN: r273308
2019-07-09 10:36:00 -06:00
Martin Liska 8ba6ea878f Remove another bunch of dead assignment.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* lra-eliminations.c (eliminate_regs_in_insn): Remove
	dead assignemts.
	* reg-stack.c (check_asm_stack_operands): Likewise.
	* tree-ssa-structalias.c (create_function_info_for): Likewise.
	* tree-vect-generic.c (expand_vector_operations_1): Likewise.
	* config/i386/i386-expand.c (ix86_expand_sse2_mulvxdi3): Use
	force_expand_binop.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* c-common.c (try_to_locate_new_include_insertion_point): Remove
	dead assignemts.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* call.c (build_new_op_1): Remove
	dead assignemts.
	* typeck.c (cp_build_binary_op): Likewise.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* check.c (gfc_check_c_funloc): Remove
	dead assignemts.
	* decl.c (variable_decl): Likewise.
	* resolve.c (resolve_typebound_function): Likewise.
	* simplify.c (gfc_simplify_matmul): Likewise.
	(gfc_simplify_scan): Likewise.
	* trans-array.c (gfc_could_be_alias): Likewise.
	* trans-common.c (add_equivalences): Likewise.
	* trans-expr.c (trans_class_vptr_len_assignment): Likewise.
	(gfc_trans_array_constructor_copy): Likewise.
	(gfc_trans_assignment_1): Likewise.
	* trans-intrinsic.c (conv_intrinsic_atomic_op): Likewise.
	* trans-openmp.c (gfc_omp_finish_clause): Likewise.
	* trans-types.c (gfc_get_array_descriptor_base): Likewise.
	* trans.c (gfc_build_final_call): Likewise.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* line-map.c (linemap_get_expansion_filename): Remove
	dead assignemts.
	* mkdeps.c (make_write): Likewise.

From-SVN: r272994
2019-07-03 08:34:20 +00:00
Qing Zhao 1c6ffbab63 re PR preprocessor/90581 (provide an option to adjust the maximum depth of nested #include)
PR preprocessor/90581
Add a cpp option -fmax-include-depth to set the maximum depth of the nested #include.

From-SVN: r272948
2019-07-02 20:23:30 +00:00
Nathan Sidwell 66d7749bce [PR preprocessor/90927] Fixe dependency output
https://gcc.gnu.org/ml/gcc-patches/2019-06/msg01664.html
	libcpp/
	PR preprocessor/90927
	* mkdeps.c (mkdeps::vec::operator[]): Add non-const variant.
	(deps_add_target): Deal with out of order unquoted targets.

	gcc/testsuite/
	* c-c++-common/pr90927.c: New.

From-SVN: r272692
2019-06-26 12:58:39 +00:00
Andrew Pinski 3f23e487f3 [PATCH] Fix PR 81721: ICE with PCH and Pragma warning and C++ operator
libcpp/ChangeLog:
2019-05-19  Andrew Pinski  <apinski@marvell.com>

        PR pch/81721
        * lex.c (cpp_token_val_index <case SPELL_OPERATOR>): If tok->flags
        has NAMED_OP set, then return CPP_TOKEN_FLD_NODE.

gcc/testsuite/ChangeLog:
2019-05-19  Andrew Pinski  <apinski@marvell.com>

        PR pch/81721
        * g++.dg/pch/operator-1.C: New testcase.
        * g++.dg/pch/operator-1.Hs: New file.

From-SVN: r271395
2019-05-19 23:59:06 -07:00
Martin Liska 19eda56db6 Fix min_location usage in line-map.c (PR preprocessor/90382).
2019-05-14  Martin Liska  <mliska@suse.cz>

	PR preprocessor/90382
	* line-map.c (first_map_in_common_1): Handle ADHOC
	locations.

From-SVN: r271163
2019-05-14 11:41:53 +00:00
Martin Liska e6fc8353fc Do a refactoring in linemap (PR preprocessor/90382).
2019-05-14  Martin Liska  <mliska@suse.cz>

	PR preprocessor/90382
	* include/line-map.h (get_data_from_adhoc_loc): Add const to
	the first argument.
	(get_location_from_adhoc_loc): Likewise.
	* line-map.c(get_data_from_adhoc_loc):  Add const to
	the first argument.
	(get_location_from_adhoc_loc): Likewise.
	(get_combined_adhoc_loc): Use get_location_from_adhoc_loc
	(or get_data_from_adhoc_loc).
	(get_range_from_adhoc_loc): Likewise.
	(get_pure_location): Likewise.
	(linemap_position_for_loc_and_offset): Likewise.
	(linemap_lookup): Likewise.
	(linemap_ordinary_map_lookup): Likewise.
	(linemap_macro_map_lookup): Likewise.
	(linemap_get_expansion_line): Likewise.
	(linemap_get_expansion_filename): Likewise.
	(linemap_location_in_system_header_p): Likewise.
	(linemap_location_from_macro_expansion_p): Likewise.
	(linemap_macro_loc_to_exp_point): Likewise.
	(linemap_resolve_location): Likewise.
	(linemap_unwind_toward_expansion): Likewise.
	(linemap_unwind_to_first_non_reserved_loc): Likewise.
	(linemap_expand_location): Likewise.
	(linemap_dump_location): Likewise.

From-SVN: r271162
2019-05-14 11:41:40 +00:00
Nathan Sidwell 61145d937b [libcpp] Reimplement mkdeps data structures
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00323.html
	* files.c (_cpp_stack_file): Empty filenames aren't dependencies.
	* mkdeps.c (deps_add_dep): Assert not empty.

From-SVN: r270978
2019-05-07 18:13:57 +00:00
Nathan Sidwell d7b6aee8cd [libcpp] Reimplement mkdeps data structures
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00293.html
	* include/mkdeps.h (deps_write): Add PHONY arg.
	(deps_phony_targets): Delete.
	* init.c (cpp_finish): Just call deps_write.
	* mkdeps.c (struct mkdeps): Add local vector class.  Reimplement
	vector handling.
	(munge): Munge to static buffer.
	(apply_vpath): Adjust vector handling.
	(deps_init, deps_free): Use new, delete.
	(deps_add_target): Do not munge here.  Record quoting low water mark.
	(deps_add_dep): Do not munge here.
	(deps_add_vpath): Adjust vector handling.
	(make_write_name): New.  Munge on demand here.
	(make_write_vec): New.
	(deps_phony_targets): Delete.
	(make_write): New.
	(deps_write): Forward to deps_Write.
	(deps_save, deps_restore): Adjust vector handling.

From-SVN: r270943
2019-05-07 12:39:59 +00:00
Nathan Sidwell b744fc85f5 [libcpp] struct deps renaming
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00199.html
	libcpp/
	* include/mkdeps.h: Rename struct deps to struct mkdeps.
	* mkdeps.c: Likewise.
	* include/cpplib.h (cpp_get_deps): Rename return type..
	* directives.c (cpp_get_deps): Likewise.
	* internal.h (struct cpp_reader): Rename deps field type.

	gcc/c-family/
	* c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.

From-SVN: r270905
2019-05-06 11:34:47 +00:00
Jonathan Wakely 0bf12a5253 Fix typo in comment
* files.c (search_path_exhausted): Fix typo in comment.

From-SVN: r270132
2019-04-03 18:56:41 +01:00
Martin Liska 60448173c4 Improve memory statistics report readability.
2019-02-26  Martin Liska  <mliska@suse.cz>

	* alloc-pool.h (struct pool_usage): Remove extra
	print_dash_line.
	* bitmap.h (struct bitmap_usage): Likewise.
	* ggc-common.c (struct ggc_usage): Likewise.
	* mem-stats.h (struct mem_usage): Likewise.
	(mem_alloc_description::dump): Print dash lines
	here and repeat header at the end of a table report.
	It's then more readable.
	* tree-phinodes.c (phinodes_print_statistics): Make
	horizontal alignment.
	* tree-ssanames.c (ssanames_print_statistics): Likewise.
	* vec.c (struct vec_usage): Remove extra print_dash_line.
	* vec.h (vec_safe_grow_cleared): Pass PASS_MEM_STAT.
2019-02-26  Martin Liska  <mliska@suse.cz>

	* symtab.c (ht_dump_statistics): Make
	horizontal alignment for statistics.

From-SVN: r269221
2019-02-26 17:27:52 +00:00
David Malcolm 200a8e1a38 Fix ICE with #line directive (PR c/89410)
PR c/89410 reports various issues with #line directives with very
large numbers; one of them is an ICE inside diagnostic-show-locus.c
when emitting a diagnostic at line 0xffffffff.

The issue is that the arithmetic in layout::calculate_line_spans to
determine if two line spans are sufficiently close to consolidate
was using the unsigned 32-bit linenum_type, which was overflowing
when comparing the line for the expanded location with those of
the location range (all on line 0xffffffff), leading to it
erroneously adding two spans for the same line, leading to an
assertion failure.

This patch fixes the ICE by generalizing the use of long long in
line-map.h's comparison function for linenum_type into a new
linenum_arith_t typedef, and using it here.

Doing so uncovered a second problem: the loop to print the lines
within the line_span for this case is infinite: looping from
0xfffffff upwards, overflowing to 0, and then never becoming
greater than 0xfffffff.  The patch fixes this by using linenum_arith_t
there also.

gcc/ChangeLog:
	PR c/89410
	* diagnostic-show-locus.c (layout::calculate_line_spans): Use
	linenum_arith_t when determining if two adjacent line spans are
	close enough to merge.
	(diagnostic_show_locus): Use linenum_arith_t when iterating over
	lines within each line_span.

gcc/testsuite/ChangeLog:
	PR c/89410
	* gcc.dg/pr89410-1.c: New test.
	* gcc.dg/pr89410-2.c: New test.

libcpp/ChangeLog:
	PR c/89410
	* include/line-map.h (linenum_arith_t): New typedef.
	(compare): Use it.

From-SVN: r269050
2019-02-20 20:07:20 +00:00
Martin Liska a5f87af7ed Use 1UL constant in order to not overflow (PR c++/89383).
2019-02-18  Martin Liska  <mliska@suse.cz>

	PR c++/89383
	* line-map.c (linemap_line_start): Use 1UL in order
	to not overflow.

From-SVN: r268981
2019-02-18 09:46:19 +00:00
David Malcolm a4553534df linemap_line_start: protect against location_t overflow (PR lto/88147)
PR lto/88147 reports an assertion failure due to a bogus location_t value
when adding a line to a pre-existing line map, when there's a large
difference between the two line numbers.

For some "large differences", this leads to a location_t value that exceeds
LINE_MAP_MAX_LOCATION, in which case linemap_line_start returns 0.  This
isn't ideal, but at least should lead to safe degradation of location
information.

However, if the difference is very large, it's possible for the line
number offset (relative to the start of the map) to be sufficiently large
that overflow occurs when left-shifted by the column-bits, and hence
the check against the LINE_MAP_MAX_LOCATION limit fails, leading to
a seemingly-valid location_t value, but encoding the wrong location.  This
triggers the assertion failure:
  linemap_assert (SOURCE_LINE (map, r) == to_line);

The fix (thanks to Martin) is to check for overflow when determining
whether to reuse an existing map, and to not reuse it if it would occur.

gcc/ChangeLog: David Malcolm  <dmalcolm@redhat.com>
	PR lto/88147
	* input.c (selftest::test_line_offset_overflow): New selftest.
	(selftest::input_c_tests): Call it.

libcpp/ChangeLog: Martin Liska  <mliska@suse.cz>
	PR lto/88147
	* line-map.c (linemap_line_start): Don't reuse the existing line
	map if the line offset is sufficiently large to cause overflow
	when computing location_t values.

From-SVN: r268789
2019-02-12 01:09:31 +00:00
Jakub Jelinek 18f5df94df re PR preprocessor/88974 (ICE: Segmentation fault (in linemap_resolve_location))
PR preprocessor/88974
	* directives.c (SEEN_EOL): Move macro to ...
	* internal.h (SEEN_EOL): ... here.
	* expr.c (parse_has_include): Don't cpp_get_token if SEEN_EOL ().

	* c-c++-common/cpp/pr88974.c: New test.

From-SVN: r268285
2019-01-26 11:08:00 +01:00
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Mike Gulick bc65bad27f PR preprocessor/83173: Enhance -fdump-internal-locations output
gcc/ChangeLog:
2018-11-27  Mike Gulick  <mgulick@mathworks.com>

	PR preprocessor/83173
	* input.c (dump_location_info): Dump reason and included_from
	fields from line_map_ordinary struct.  Fix indentation when
	location > 5 digits.
	* diagnostic-show-locus.c (num_digits, num_digits): Move to
	diagnostic.c to allow it to be utilized by input.c.
	* diagnostic.c (num_digits, selftest::test_num_digits): Moved
	here.
	(selftest::diagnostic_c_tests): Run selftest::test_num_digits.
	* diagnostic.h (num_digits): Add extern definition.

libcpp/ChangeLog:
2018-11-27  Mike Gulick  <mgulick@mathworks.com>

	PR preprocessor/83173
	* location-example.txt: Update example -fdump-internal-locations
	output.

From-SVN: r266520
2018-11-27 16:04:31 +00:00
Mike Gulick 56c79e7f5d PR preprocessor/83173: Additional check before decrementing highest_location
2018-11-27  Mike Gulick  <mgulick@mathworks.com>

	PR preprocessor/83173
	* files.c (_cpp_stack_include): Check if
	line_table->highest_location is past current line before
	decrementing.

From-SVN: r266516
2018-11-27 15:49:43 +00:00
David Malcolm 620e594be5 Eliminate source_location in favor of location_t
Historically GCC used location_t, while libcpp used source_location.

This inconsistency has been annoying me for a while, so this patch
removes source_location in favor of location_t throughout
(as the latter is shorter).

gcc/ChangeLog:
	* builtins.c: Replace "source_location" with "location_t".
	* diagnostic-show-locus.c: Likewise.
	* diagnostic.c: Likewise.
	* dumpfile.c: Likewise.
	* gcc-rich-location.h: Likewise.
	* genmatch.c: Likewise.
	* gimple.h: Likewise.
	* gimplify.c: Likewise.
	* input.c: Likewise.
	* input.h: Likewise.  Eliminate the typedef.
	* omp-expand.c: Likewise.
	* selftest.h: Likewise.
	* substring-locations.h (get_source_location_for_substring):
	Rename to..
	(get_location_within_string): ...this.
	* tree-cfg.c: Replace "source_location" with "location_t".
	* tree-cfgcleanup.c: Likewise.
	* tree-diagnostic.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-phinodes.h: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssa.h: Likewise.
	* tree-vect-loop-manip.c: Likewise.

gcc/c-family/ChangeLog:
	* c-common.c (c_get_substring_location): Update for renaming of
	get_source_location_for_substring to get_location_within_string.
	* c-lex.c: Replace "source_location" with "location_t".
	* c-opts.c: Likewise.
	* c-ppoutput.c: Likewise.

gcc/c/ChangeLog:
	* c-decl.c: Replace "source_location" with "location_t".
	* c-tree.h: Likewise.
	* c-typeck.c: Likewise.
	* gimple-parser.c: Likewise.

gcc/cp/ChangeLog:
	* call.c: Replace "source_location" with "location_t".
	* cp-tree.h: Likewise.
	* cvt.c: Likewise.
	* name-lookup.c: Likewise.
	* parser.c: Likewise.
	* typeck.c: Likewise.

gcc/fortran/ChangeLog:
	* cpp.c: Replace "source_location" with "location_t".
	* gfortran.h: Likewise.

gcc/go/ChangeLog:
	* go-gcc-diagnostics.cc: Replace "source_location" with "location_t".
	* go-gcc.cc: Likewise.
	* go-linemap.cc: Likewise.
	* go-location.h: Likewise.
	* gofrontend/README: Likewise.

gcc/jit/ChangeLog:
	* jit-playback.c: Replace "source_location" with "location_t".

gcc/testsuite/ChangeLog:
	* g++.dg/plugin/comment_plugin.c: Replace "source_location" with
	"location_t".
	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c: Likewise.

libcc1/ChangeLog:
	* libcc1plugin.cc: Replace "source_location" with "location_t".
	(plugin_context::get_source_location): Rename to...
	(plugin_context::get_location_t): ...this.
	* libcp1plugin.cc: Likewise.

libcpp/ChangeLog:
	* charset.c: Replace "source_location" with "location_t".
	* directives-only.c: Likewise.
	* directives.c: Likewise.
	* errors.c: Likewise.
	* expr.c: Likewise.
	* files.c: Likewise.
	* include/cpplib.h: Likewise.  Rename MAX_SOURCE_LOCATION to
	MAX_LOCATION_T.
	* include/line-map.h: Likewise.
	* init.c: Likewise.
	* internal.h: Likewise.
	* lex.c: Likewise.
	* line-map.c: Likewise.
	* location-example.txt: Likewise.
	* macro.c: Likewise.
	* pch.c: Likewise.
	* traditional.c: Likewise.

From-SVN: r266085
2018-11-13 20:05:03 +00:00
Hafiz Abid Qadeer e9f3803db3 iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
2018-11-06  Hafiz Abid Qadeer  <abidh@codesourcery.com>

	* config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
	Append $INCICONV to it.

gcc/
	* configure: Regenerated.

libcpp/
	* configure: Likewise.

libstdc++-v3/
	* configure: Likewise.

intl/
	* configure: Likewise.

From-SVN: r265896
2018-11-07 15:41:21 -07:00