1. 02 Jul, 2019 1 commit
  2. 26 Jun, 2019 1 commit
  3. 20 May, 2019 1 commit
  4. 14 May, 2019 2 commits
    • Fix min_location usage in line-map.c (PR preprocessor/90382). · 19eda56d
      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
      Martin Liska committed
    • Do a refactoring in linemap (PR preprocessor/90382). · e6fc8353
      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
      Martin Liska committed
  5. 07 May, 2019 2 commits
  6. 06 May, 2019 1 commit
  7. 03 Apr, 2019 1 commit
  8. 08 Mar, 2019 1 commit
  9. 26 Feb, 2019 1 commit
    • Improve memory statistics report readability. · 60448173
      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
      Martin Liska committed
  10. 20 Feb, 2019 1 commit
    • Fix ICE with #line directive (PR c/89410) · 200a8e1a
      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
      David Malcolm committed
  11. 18 Feb, 2019 1 commit
  12. 14 Feb, 2019 1 commit
  13. 12 Feb, 2019 1 commit
    • linemap_line_start: protect against location_t overflow (PR lto/88147) · a4553534
      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
      David Malcolm committed
  14. 06 Feb, 2019 2 commits
  15. 05 Feb, 2019 1 commit
    • Update .po files. · 4f2f8148
      gcc/po:
      	* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
      	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
      	zh_TW.po: Update.
      
      libcpp/po:
      	* be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, fi.po, fr.po,
      	id.po, ja.po, nl.po, pr_BR.po, ru.po, sr.po, sv.po, tr.po, uk.po,
      	vi.po, zh_CN.po, zh_TW.po: Update.
      
      From-SVN: r268567
      Joseph Myers committed
  16. 01 Feb, 2019 1 commit
  17. 26 Jan, 2019 1 commit
  18. 01 Jan, 2019 1 commit
  19. 27 Nov, 2018 2 commits
    • PR preprocessor/83173: Enhance -fdump-internal-locations output · bc65bad2
      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
      Mike Gulick committed
    • PR preprocessor/83173: Additional check before decrementing highest_location · 56c79e7f
      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
      Mike Gulick committed
  20. 13 Nov, 2018 1 commit
    • Eliminate source_location in favor of location_t · 620e594b
      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
      David Malcolm committed
  21. 07 Nov, 2018 1 commit
  22. 05 Nov, 2018 3 commits
  23. 31 Oct, 2018 7 commits
    • Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). · 22e05272
      This patch updates GCC to use autoconf 2.69 and automake 1.15.1.
      (That's not the latest automake version, but it's the one used by
      binutils-gdb, with which consistency is desirable, and in any case
      seems a useful incremental update that should make a future update to
      1.16.1 easier.)
      
      The changes are generally similar to the binutils-gdb ones, and are
      copied from there where shared files and directories are involved
      (there are some further changes to such shared directories, however,
      which I'd expect to apply to binutils-gdb once this patch is in GCC).
      Largely, obsolete AC_PREREQ calls are removed, while many
      AC_LANG_SOURCE calls are added to avoid warnings from aclocal and
      autoconf.  Multilib support is no longer included in core automake,
      meaning that multilib.am needs copying from automake's contrib
      directory into the GCC source tree.  Autoconf 2.69 has Go support, so
      local copies of that support are removed.  I hope the D support will
      soon be submitted to upstream autoconf so the local copy of that can
      be removed in a future update.  Changes to how automake generates
      runtest calls mean quotes are removed from RUNTEST definitions in five
      lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm,
      libphobos, libvtv; some others have RUNTEST definitions without
      quotes, which are still OK); libgo and libphobos also get
      -Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST
      do not generate automake warnings.
      
      Note that the regeneration did not include regeneration of
      fixincludes/config.h.in (attempting such regeneration resulted in all
      the USED_FOR_TARGET conditionals disappearing; and I don't see
      anything in the fixincludes/ directory that would result in such
      conditionals being generated, unlike in the gcc/ directory).  Also
      note that libvtv/testsuite/other-tests/Makefile.in was not
      regenerated; that directory is not listed as a subdirectory for which
      Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm
      not sure how it's meant to be regenerated.
      
      While I mostly fixed warnings should running aclocal / automake /
      autoconf, there were various such warnings from automake in the
      libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos
      directories that I did not fix, preferring to leave those to the
      relevant subsystem maintainers.  Specifically, most of those warnings
      were of the following form (example from libgfortran):
      
      Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory,
      Makefile.am:48: but option 'subdir-objects' is disabled
      automake: warning: possible forward-incompatibility.
      automake: At least a source file is in a subdirectory, but the 'subdir-objects'
      automake: automake option hasn't been enabled.  For now, the corresponding output
      automake: object file(s) will be placed in the top-level directory.  However,
      automake: this behaviour will change in future Automake versions: they
      will
      automake: unconditionally cause object files to be placed in the same subdirectory
      automake: of the corresponding sources.
      automake: You are advised to start using 'subdir-objects' option throughout your
      automake: project, to avoid future incompatibilities.
      
      I think it's best for the relevant maintainers to add subdir-objects
      and do any other associated Makefile.am changes needed.  In some cases
      the paths in the warnings involved ../; I don't know if that adds any
      extra complications to the use of subdir-objects.
      
      I've tested this with native, cross and Canadian cross builds.  The
      risk of any OS-specific issues should I hope be rather lower than if a
      libtool upgrade were included (we *should* do such an upgrade at some
      point, but it's more complicated - it involves identifying all our
      local libtool changes to see if any aren't included in the upstream
      version we update to, and reverting an upstream libtool patch that's
      inappropriate for use in GCC); I think it would be better to get this
      update into GCC so that people can test in different configurations
      and we can fix any issues found, rather than to try to get more and
      more testing done before it goes in.
      
      top level:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* multilib.am: New file.  From automake.
      
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* libtool.m4: Use AC_LANG_SOURCE.
      	* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
      	* ar-lib: New file.
      	* test-driver: New file.
      	* configure: Re-generate.
      
      config:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* math.m4, tls.m4: Use AC_LANG_SOURCE.
      
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.
      
      fixincludes:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* aclocal.m4, configure: Regenerate.
      
      gcc:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
      	line for second argument of AC_DEFINE_UNQUOTED.
      	* doc/install.texi (Tools/packages necessary for modifying GCC):
      	Update to autoconf 2.69 and automake 1.15.1.
      	* aclocal.m4, config.in, configure: Regenerate.
      
      gnattools:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* configure: Regenerate.
      
      gotools:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* config/go.m4: Remove file.
      	* Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config.
      	* configure.ac:  Remove AC_PREREQ.  Do not include config/go.m4.
      	* Makefile.in, aclocal.m4, configure: Regenerate.
      
      intl:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ.
      	* configure: Re-generate.
      	* config.h.in: Re-generate.
      	* aclocal.m4: Re-generate.
      
      libada:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* configure: Regenerate.
      
      libatomic:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* acinclude.m4: Use AC_LANG_SOURCE.
      	* configure.ac: Remove AC_PREREQ.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      libbacktrace:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
      
      libcc1:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure: Regenerate.
      
      libcpp:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* aclocal.m4, config.in, configure: Regenerate.
      
      libdecnumber:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* configure.ac: Remove AC_PREREQ.
      	* configure: Re-generate.
      	* aclocal.m4.
      
      libffi:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	(AUTOMAKE_OPTIONS): Add info-in-builddir.
      	(CLEANFILES): Remove doc/libffi.info.
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure, fficonfig.h.in,
      	include/Makefile.in, man/Makefile.in, testsuite/Makefile.in:
      	Regenerate.
      
      libgcc:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* configure: Regenerate.
      
      libgfortran:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
      
      libgo [logically part of this change but omitted from the commit]:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* config/go.m4: Remove file.
      	* config/libtool.m4: Use AC_LANG_SOURCE.
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use
      	-Wno-override in AM_INIT_AUTOMAKE call.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      libgomp:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am
      	(AUTOMAKE_OPTIONS): Add info-in-builddir.
      	(CLEANFILES): Remove libgomp.info.
      	* configure.ac: Remove AC_PREREQ.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      libhsail-rt:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure: Regenerate.
      
      libiberty:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* configure.ac: Remove AC_PREREQ.
      	* configure: Re-generate.
      	* config.in: Re-generate.
      
      libitm:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	(AUTOMAKE_OPTIONS): Add info-in-builddir.
      	(CLEANFILES): Remove libitm.info.
      	* configure.ac: Remove AC_PREREQ.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      libobjc:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* aclocal.m4, config.h.in, configure: Regenerate.
      
      liboffloadmic:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.
      	* plugin/Makefile.am: Include multilib.am.
      	* plugin/configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure, plugin/Makefile.in,
      	plugin/aclocal.m4, plugin/configure: Regenerate.
      
      libphobos:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.  Use -Wno-override in
      	AM_INIT_AUTOMAKE call.
      	* m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call.
      	* m4/druntime/os.m4: Use AC_LANG_SOURCE.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in,
      	src/Makefile.in, testsuite/Makefile.in: Regenerate.
      
      libquadmath:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	(AUTOMAKE_OPTIONS): Remove 1.8.  Add info-in-builddir.
      	(all-local): Define outside conditional code.
      	(CLEANFILES): Remove libquadmath.info.
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
      
      libsanitizer:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* Makefile.in, aclocal.m4, asan/Makefile.in, configure,
      	interception/Makefile.in, libbacktrace/Makefile.in,
      	lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in,
      	ubsan/Makefile.in: Regenerate.
      
      libssp:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	(AUTOMAKE_OPTIONS): Remove 1.9.5.
      	* configure.ac: Remove AC_PREREQ.  Quote argument to
      	AC_RUN_IFELSE.
      	* Makefile.in, aclocal.m4, configure: Regenerate.
      
      libstdc++-v3:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure, doc/Makefile.in,
      	include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
      	python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in,
      	src/c++17/Makefile.in, src/c++98/Makefile.in,
      	src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.
      
      libvtv:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      lto-plugin:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
      
      zlib:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* configure.ac: Modernize AC_INIT call, remove AC_PREREQ.
      	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign.
      	* Makefile.in: Re-generate.
      	* aclocal.m4: Re-generate.
      	* configure: Re-generate.
      
      From-SVN: r265695
      Joseph Myers committed
    • [6/6] Preprocessor forced macro location · f3f6029d
      https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02044.html
      	libcpp/
      	* internal.h (struct cpp_reader): Rename forced_token_location_p
      	to forced_token_location and drop its pointerness.
      	* include/cpplib.h (cpp_force_token_locations): Take location, not
      	pointer to one.
      	* init.c (cpp_create_reader): Adjust.
      	* lex.c (cpp_read_main_file): 
      
      	gcc/c-family/
      	* c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
      
      	gcc/fortran/
      	* cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
      
      From-SVN: r265692
      Nathan Sidwell committed
    • [5/6] Preprocessor include · 705b0c05
      https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02041.html
      	* directives.c (do_include_common): Commonize cleanup path.
      	(_cpp_pop_buffer): Fix leak.
      
      From-SVN: r265690
      Nathan Sidwell committed
    • [4/7] Preprocessor location-kind predicates · 87bacc2b
      https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02040.html
      	* include/line-map.h (IS_ORDINARY_LOC, IS_MACRO_LOC): New
      	predicates.
      	(IS_ADHOC_LOC): Move earlier.
      	(MAP_ORDINARY_P): Use IS_ORDINARY_LOC.
      	* line-map.c (linemap_location_from_macro_expansion_p): Use
      	IS_MACRO_LOC.
      
      From-SVN: r265689
      Nathan Sidwell committed
    • [3/7] Preprocessor macro loc · c9fb347e
      https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02039.html
      	* include/cpplib.h (cpp_macro_definition_location): Make inline.
      	* macro.c (warn_of_redefinition): Fix comments, examine macro
      	type, use C++ for.
      	(cpp_macro_definition_location): Don't define here.
      
      From-SVN: r265688
      Nathan Sidwell committed
    • [2/7] Preprocessor node access · 43af5ef1
      https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02038.html
      	* include/cpplib.h (HT_NODE): Don't cast NODE.
      	(NODE_LEN, NODE_NAME): Use HT_NODE.
      
      From-SVN: r265687
      Nathan Sidwell committed
    • [1/7] Preprocessor cleanup · ff65e980
      https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02037.html
      	* directives.c (DIRECTIVE_TABLE): Drop historical frequency
      	comments.
      	* files.c (_cpp_stack_file): Fix indentation.
      
      From-SVN: r265685
      Nathan Sidwell committed
  24. 17 Oct, 2018 1 commit
    • Add -std=c2x, -std=gnu2x, -Wc11-c2x-compat, C2X _Static_assert support. · 9f936c86
      Now new features are starting to be added to a C2X draft (in the C2x
      branch of the C standard git repository, no public WG14 document yet),
      it's time to add -std=c2x and associated options to GCC for use in
      enabling C2X features.
      
      This patch adds the expected set of options: -std=c2x, -std=gnu2x,
      -Wc11-c2x-compat.  A first C2X feature is added (the only one so far
      in the repository that's obviously relevant to GCC): support (as in
      C++) for the string constant to be omitted in _Static_assert.  This
      feature is duly also supported as an extension in earlier standard
      modes (diagnosed with -pedantic, unless -Wno-c11-c2x-compat is given,
      or with -Wc11-c2x-compat even in C2X mode).
      
      Bootstrapped with no regressions on x86_64-pc-linux-gnu.
      
      gcc/
      	* doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
      	* doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
      	* doc/standards.texi (C Language): Document C2X.
      	* dwarf2out.c (highest_c_language), config/rl78/rl78.c
      	(rl78_option_override): Handle "GNU C2X" language name.
      
      gcc/c/
      	* c-errors.c (pedwarn_c11): New function.
      	* c-parser.c (disable_extension_diagnostics): Save
      	warn_c11_c2x_compat and set it to 0.
      	(restore_extension_diagnostics): Restore warn_c11_c2x_compat.
      	(c_parser_static_assert_declaration_no_semi): Handle
      	_Static_assert without string constant.
      	* c-tree.h (pedwarn_c11): New prototype.
      
      gcc/c-family/
      	* c-common.c (flag_isoc2x): New variable.
      	* c-common.h (clk_c): Update comment to reference C2X.
      	(flag_isoc99, flag_isoc11): Update comments to reference future
      	standard versions in general.
      	(flag_isoc2x): Declare.
      	* c-opts.c (set_std_c2x): New function.
      	(c_common_handle_option): Handle -std=c2x and -std=gnu2x.
      	(set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
      	flag_isoc2x to 0.
      	* c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
      
      gcc/testsuite/
      	* gcc.dg/c11-static-assert-7.c, gcc.dg/c11-static-assert-8.c,
      	gcc.dg/c11-static-assert-9.c, gcc.dg/c2x-static-assert-1.c,
      	gcc.dg/c2x-static-assert-2.c, gcc.dg/c99-static-assert-2.c,
      	gcc.dg/gnu2x-static-assert-1.c: New tests.
      	* gcc.dg/missing-symbol-3.c: Update expected fix-it text.
      
      libcpp/
      	* include/cpplib.h (enum c_lang): Add CLK_GNUC2X and CLK_STDC2X.
      	* init.c (lang_defaults): Add GNUC2X and STDC2X entries.
      	(cpp_init_builtins): Define __STDC_VERSION__ to 202000L for C2X.
      
      From-SVN: r265251
      Joseph Myers committed
  25. 11 Oct, 2018 2 commits
    • libcpp: show macro definition when used with wrong argument count · 954ad112
      Consider:
      
      demo.c: In function 'test':
      demo.c:5:40: error: macro "LOG_2" requires 3 arguments, but only 2 given
      5 |   LOG_2 ("loading file: %s\n", filename);
        |                                        ^
      
      This patch adds a note showing the definition of the macro in
      question, giving:
      
      demo.c: In function 'test':
      demo.c:5:40: error: macro "LOG_2" requires 3 arguments, but only 2 given
      5 |   LOG_2 ("loading file: %s\n", filename);
        |                                        ^
      In file included from demo.c:1:
      logging.h:1: note: macro "LOG_2" defined here
      1 | #define LOG_2(FMT, ARG0, ARG1) do { fprintf (stderr, (FMT), (ARG0), (ARG1)); }
        | 
      
      gcc/testsuite/ChangeLog:
      	* g++.dg/diagnostic/macro-arg-count.C: Move to...
      	* c-c++-common/cpp/macro-arg-count-1.c: ...here, generalizing
      	output for C vs C++.  Expect notes showing the definitions of the
      	macros.
      	* c-c++-common/cpp/macro-arg-count-2.c: New test, adapted from the
      	above.
      
      libcpp/ChangeLog:
      	* macro.c (_cpp_arguments_ok): If the argument count is wrong, add
      	a note showing the definition of the macro.
      
      From-SVN: r265040
      David Malcolm committed
    • [PATCH] A couple of line map fixes · c1b48b29
      https://gcc.gnu.org/ml/gcc-patches/2018-10/msg00623.html
      	* include/line-map.h (LINEMAPS_MACRO_LOWEST_LOCATION): Fix
      	off-by-one error.
      	* line-map.c (linemap_enter_macro): Use RAII.  Clear all of the
      	macro_locations.
      
      From-SVN: r265037
      Nathan Sidwell committed
  26. 09 Oct, 2018 1 commit
    • Cleanup of libcpp diagnostic callbacks · c24300ba
      This patch renames the "error" callback within libcpp
      to "diagnostic", and uses the pair of enums in cpplib.h, rather
      than passing two different kinds of "int" around.
      
      gcc/c-family/ChangeLog:
      	* c-common.c (c_option_controlling_cpp_error): Rename to...
      	(c_option_controlling_cpp_diagnostic): ...this, and convert
      	"reason" from int to enum.
      	(c_cpp_error): Rename to...
      	(c_cpp_diagnostic): ...this, converting level and reason to enums.
      	* c-common.h (c_cpp_error): Rename to...
      	(c_cpp_diagnostic): ...this, converting level and reason to enums.
      	* c-opts.c (c_common_init_options): Update for renaming.
      
      gcc/fortran/ChangeLog:
      	* cpp.c (gfc_cpp_init_0): Update for renamings.
      	(cb_cpp_error): Rename to...
      	(cb_cpp_diagnostic): ...this, converting level and reason to
      	enums.
      
      gcc/ChangeLog:
      	* genmatch.c (error_cb): Rename to...
      	(diagnostic_cb): ...this, converting int params to enums.
      	(fatal_at): Update for renaming.
      	(warning_at): Likewise.
      	(main): Likewise.
      	* input.c (selftest::ebcdic_execution_charset::apply):
      	Update for renaming of...
      	(selftest::ebcdic_execution_charset::on_error): ...this, renaming
      	to...
      	(selftest::ebcdic_execution_charset::on_diagnostic): ...this,
      	converting level and reason to enums.
      	(class selftest::lexer_error_sink): Rename to...
      	(class selftest::lexer_test_options): ...this, renaming field
      	"m_errors" to "m_diagnostics".
      	(selftest::lexer_test_options::apply): Update for renaming of...
      	(selftest::lexer_test_options::on_error): ...this, renaming to...
      	(selftest::lexer_test_options::on_diagnostic): ...this
      	converting level and reason to enums.
      	(selftest::test_lexer_string_locations_raw_string_unterminated):
      	Update for renamings.
      	* opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
      	"reason".
      
      libcpp/ChangeLog:
      	* charset.c (noop_error_cb): Rename to...
      	(noop_diagnostic_cb): ...this, converting params to enums.
      	(cpp_interpret_string_ranges): Update for renaming and enums.
      	* directives.c (check_eol_1): Convert reason to enum.
      	(do_diagnostic): Convert code and reason to enum.
      	(do_error): Use CPP_W_NONE rather than 0.
      	(do_pragma_dependency): Likewise.
      	* errors.c (cpp_diagnostic_at): Convert level and reason to enums.
      	Update for renaming.
      	(cpp_diagnostic): Convert level and reason to enums.
      	(cpp_error): Convert level to enum.
      	(cpp_warning): Convert reason to enums.
      	(cpp_pedwarning): Likewise.
      	(cpp_warning_syshdr): Likewise.
      	(cpp_diagnostic_with_line): Convert level and reason to enums.
      	Update for renaming.
      	(cpp_error_with_line): Convert level to enum.
      	(cpp_warning_with_line): Convert reason to enums.
      	(cpp_pedwarning_with_line): Likewise.
      	(cpp_warning_with_line_syshdr): Likewise.
      	(cpp_error_at): Convert level to enum.
      	(cpp_errno): Likewise.
      	(cpp_errno_filename): Likewise.
      	* include/cpplib.h (enum cpp_diagnostic_level): Name this enum,
      	and move to before struct cpp_callbacks.
      	(enum cpp_warning_reason): Likewise.
      	(cpp_callbacks::diagnostic): Convert params from int to enums.
      	(cpp_error): Convert int param to enum cpp_diagnostic_level.
      	(cpp_warning): Convert int param to enum cpp_warning_reason.
      	(cpp_pedwarning): Likewise.
      	(cpp_warning_syshdr): Likewise.
      	(cpp_errno): Convert int param to enum cpp_diagnostic_level.
      	(cpp_errno_filename): Likewise.
      	(cpp_error_with_line): Likewise.
      	(cpp_warning_with_line): Convert int param to enum
      	cpp_warning_reason.
      	(cpp_pedwarning_with_line): Likewise.
      	(cpp_warning_with_line_syshdr): Likewise.
      	(cpp_error_at): Convert int param to enum cpp_diagnostic_level.
      	* macro.c (create_iso_definition): Convert int to enum.
      	(_cpp_create_definition): Likewise.
      
      From-SVN: r264999
      David Malcolm committed
  27. 17 Sep, 2018 1 commit
    • Add range_idx param to range_label::get_text · 9c4a4b3c
      This patch updates the pure virtual function range_label::get_text
      (and its implementations) so that the index of the range is passed
      in, allowing for one label instance to be shared by multiple ranges.
      
      gcc/c-family/ChangeLog:
      	* c-format.c (range_label_for_format_type_mismatch::get_text):
      	Update for new param.
      
      gcc/c/ChangeLog:
      	* c-objc-common.c (range_label_for_type_mismatch::get_text):
      	Update for new param.
      	* c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
      	Likewise.
      
      gcc/cp/ChangeLog:
      	* error.c (range_label_for_type_mismatch::get_text): Update for
      	new param.
      
      gcc/ChangeLog:
      	* diagnostic-show-locus.c (class layout_range): Add field
      	"m_original_idx".
      	(layout_range::layout_range): Add "original_idx" param and use it
      	to initialize new field.
      	(make_range): Use 0 for original_idx.
      	(layout::layout): Pass in index to calls to
      	maybe_add_location_range.
      	(layout::maybe_add_location_range): Add param "original_idx" and
      	pass it on to layout_range.
      	(layout::print_any_labels): Pass on range->m_original_idx to
      	get_text call.
      	(gcc_rich_location::add_location_if_nearby): Use 0 for
      	original_idx.
      	* gcc-rich-location.h (text_range_label::get_text): Update for new
      	param.
      	(range_label_for_type_mismatch::get_text): Likewise.
      
      libcpp/ChangeLog:
      	* include/line-map.h (range_label::get_text): Add param
      	"range_idx".
      
      From-SVN: r264376
      David Malcolm committed