Re: [PATCH] Provide diagnostic hints for missing inttypes.h string constants.

2020-05-23 Thread Mark Wielaard
On Sat, May 23, 2020 at 05:01:21AM +0200, Mark Wielaard wrote: > Yes, that is actually better. And much easier to read. And the code > can still be shared between get_c_stdlib_header_for_string_macro_name > and get_stdlib_header_for_name. Changed in the attached patch. > > I also extended the

[PATCH 2/2] Provide diagnostic hints for missing C++ cinttypes string constants.

2020-05-23 Thread Mark Wielaard
When reporting an error in cp_parser and we notice a string literal followed by an unknown name check whether there is a known standard header containing a string macro with the same name, then add a hint to the error message to include that header. gcc/c-family/ChangeLog: *

[PATCH 1/2] Provide diagnostic hints for missing C inttypes.h string constants.

2020-05-23 Thread Mark Wielaard
This adds a flag to c_parser so we know when we were trying to construct a string literal. If there is a parse error and we were constructing a string literal, and the next token is an unknown identifier name, and we know there is a standard header that defines that name as a string literal, then

[PATCH] Add support for C++20 barriers

2020-05-23 Thread Thomas Rodgers
This patch requires the patch for atomic::wait/notify to be applied first. This implementation is based on the libc++ implementation, but excludes the alternative “central barrier” implementation for now as there is no standard way to switch between the two. * include/Makefile.am

[PATCH RFC] gcc-git: Add prepare-commit-msg hook.

2020-05-23 Thread Jason Merrill via Gcc-patches
This patch introduces a prepare-commit-msg hook that appends a ChangeLog skeleton to a commit message that doesn't already have one, and a 'git amend-mklog' command to amend and append a new ChangeLog skeleton (to be edited together with existing entries by hand). Thoughts? contrib/ChangeLog:

Bountysource campaign for converting the VAX backend

2020-05-23 Thread John Paul Adrian Glaubitz
Hi! The NetBSD VAX porters have shown interest in a Bountysource campaign for their GCC backend [1], so I created one [2]. The backend can be tested with the help of the SimH emulator, see [3, 4]. Adrian > [1] http://mail-index.netbsd.org/port-vax/2020/04/16/msg003460.html > [2] >

[committed] libstdc++: Compile PR93978 testcase with -Wall

2020-05-23 Thread Patrick Palka via Gcc-patches
Now that the frontend issue PR c++/94038 is thoroughly fixed, the testcase for PR93978 no longer fails to compile with -O -Wall, so add -Wall to the testcase's compile flags to help ensure we don't regress here. Committed as obvious after testing on x86_64-pc-linux-gnu. libstdc++-v3/ChangeLog:

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-23 Thread Patrick Palka via Gcc-patches
On Fri, 22 May 2020, Jason Merrill wrote: > On 5/22/20 9:18 PM, Patrick Palka wrote: > > On Fri, 22 May 2020, Jason Merrill wrote: > > > On 5/20/20 10:08 PM, Patrick Palka wrote: > > > > On Wed, 20 May 2020, Patrick Palka wrote: > > > > > On Tue, 19 May 2020, Jason Merrill wrote: > > > > > > > >

Re: [PATCH] Check and substitute AR in libcpp and libdecnumber

2020-05-23 Thread Richard Biener via Gcc-patches
On May 23, 2020 2:15:45 AM GMT+02:00, David Edelsohn via Gcc-patches wrote: >TL;DR: This patch updates configure.ac and Makefile.in in libcpp and >libdecnumber to substitute AR archiver. > >AIX supports "FAT" libraries containing 32 bit and 64 bit objects >(similar to Darwin), but commands for

[committed] libstdc++: Fix function that can't be constexpr in C++11 (PR 95289)

2020-05-23 Thread Jonathan Wakely via Gcc-patches
The body of this function isn't just a return statement, so it can't be constexpr until C++14. PR libstdc++/95289 * include/debug/helper_functions.h (__get_distance): Only declare as a constexpr function for C++14 and up. *

[patch, fortran, committed] Fix PR 95191, hang on invalid ID for WAIT

2020-05-23 Thread Thomas Koenig via Gcc-patches
Hello world, I have just committed as obvious and simple the attached patch - adding an early error return. This is a 9/10/11 Regression, so I will commit to the other branches in a few days. Regards Thhomas Fixes a hang on an invalid ID in a WAIT statement. gcc/fortran/ChangeLog:

Re: [PATCH] Extend std::copy/std::copy_n char* overload to deque iterator

2020-05-23 Thread Jonathan Wakely via Gcc-patches
On 22/05/20 22:57 +0200, François Dumont via Libstdc++ wrote: On 21/05/20 2:17 pm, Jonathan Wakely wrote: Why is the optimization not done for C++03 mode? I did it this way because the new std::copy overload rely on std::copy_n implementation details which is a C++11 algo. It looks like

Re: [PATCH] x86: Handle -mavx512vpopcntdq for -march=native

2020-05-23 Thread H.J. Lu via Gcc-patches
On Fri, May 22, 2020 at 12:42 AM Uros Bizjak wrote: > > On Thu, May 21, 2020 at 2:54 PM H.J. Lu wrote: > > > > Add -mavx512vpopcntdq for -march=native if AVX512VPOPCNTDQ is available. > > > > PR target/95258 > > * config/i386/driver-i386.c (host_detect_local_cpu): Detect > >

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-23 Thread Segher Boessenkool
Hi! Sorry this is taking so long. On Wed, May 06, 2020 at 08:57:52AM +, Yangfei (Felix) wrote: > > On Tue, Mar 24, 2020 at 06:30:12AM +, Yangfei (Felix) wrote: > > > I modified combine emitting a simple AND operation instead of making one > > zero_extract for this scenario. > > >

Re: [PATCH][PPC64] [PR88877]

2020-05-23 Thread Segher Boessenkool
Hi! On Mon, Mar 23, 2020 at 08:16:51PM +0530, kamlesh kumar wrote: > * rtl.h : Defined Tuple for bundling rtx, mode and > unsignedness default as 0 This line is too long (and your mailer wrapped it). No space before colon. Full stop at the end of a line. Write changelogs in the

Re: [PATCH] Extend std::copy/std::copy_n char* overload to deque iterator

2020-05-23 Thread François Dumont via Gcc-patches
On 22/05/20 10:57 pm, François Dumont wrote: On 21/05/20 2:17 pm, Jonathan Wakely wrote: Why is the optimization not done for C++03 mode? I did it this way because the new std::copy overload rely on std::copy_n implementation details which is a C++11 algo. It looks like the uses of

Re: [PATCH] Fix non-conforming expander [PR target/95211, PR target/95256]

2020-05-23 Thread Uros Bizjak via Gcc-patches
On Sat, May 23, 2020 at 9:25 AM Hongtao Liu wrote: > > Hi: > This patch fix non-conforming expander for > floatv2div2sf2,floatunsv2div2sf2,fix_truncv2sfv2di,fixuns_truncv2sfv2di, > refer to PR95211, PR95256. > bootstrap ok, regression test on i386/x86-64 backend is ok. > > gcc/ChangeLog: >

[committed 3/3] libstdc++: Refactor filesystem::path string conversions

2020-05-23 Thread Jonathan Wakely via Gcc-patches
This simplifies the logic of converting Source arguments and pairs of InputIterator arguments into the native string format. For any input that is a contiguous range of path::value_type (or char8_t for POSIX) a string view can be created and the conversion can be done directly, with no

[committed 2/3] libstdc++: Remove incorrect static specifiers

2020-05-23 Thread Jonathan Wakely via Gcc-patches
These functions were originally static members of the path class, but the 'static' specifiers were not removed when they were moved to namespace scope. This causes ODR violations when the functions are called from functions defined in the header, which is incompatible with Nathan's modules

[committed 1/3] libstdc++: Simplify filesystem::path SFINAE constraints

2020-05-23 Thread Jonathan Wakely via Gcc-patches
This replaces the filesystem::__detail::_Path SFINAE helper with two separate helpers, _Path and _Path2. This avoids having one helper which tries to check two different sets of requirements. The _Path helper now uses variable templates instead of a set of overloaded functions to detect

[committed 0/3] libstdc++: Refactor filesystem::path string conversions

2020-05-23 Thread Jonathan Wakely via Gcc-patches
This is a series of three patches to simplify the logic used to construct a std::filesystem::path from strings/ranges of arbitrary characters, and fix one bug. The simpler logic also avoids some unnecessary string constructions when a string view could be used instead. Previously a string view

[PATCH] Fix non-conforming expander [PR target/95211, PR target/95256]

2020-05-23 Thread Hongtao Liu via Gcc-patches
Hi: This patch fix non-conforming expander for floatv2div2sf2,floatunsv2div2sf2,fix_truncv2sfv2di,fixuns_truncv2sfv2di, refer to PR95211, PR95256. bootstrap ok, regression test on i386/x86-64 backend is ok. gcc/ChangeLog: PR target/95211 PR target/95256 * config/i386/sse.md