Re: ping: [PATCH] libcpp: Support extended characters for #pragma {push,pop}_macro [PR109704]

2024-05-28 Thread Lewis Hyatt
Hello- May I please ping this one (now for GCC 15)? Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642926.html -Lewis On Sat, Feb 10, 2024 at 9:02 AM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642926.html > >

[PATCH] libcpp: Fix _Pragma("GCC system_header") [PR114436]

2024-03-23 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114436 This is a small fix for the issue mentioned in the PR that _Pragma("GCC system_header") does not work completely. I believe it was always the case since _Pragma() support was first added. bootstrap + regtested all languages on x86-64

[gcc r14-9561] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2024-03-19 Thread Lewis Hyatt via Gcc-cvs
https://gcc.gnu.org/g:44ba7bcb752a40ec7490dea53d3a472ce633371d commit r14-9561-g44ba7bcb752a40ec7490dea53d3a472ce633371d Author: Lewis Hyatt Date: Wed Nov 8 16:13:14 2023 -0500 diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918] When a diagnostic

ping: [PATCH] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2024-03-19 Thread Lewis Hyatt
https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638692.html Thanks! On Fri, Feb 16, 2024 at 7:02 PM Lewis Hyatt wrote: > https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638692.html > > On Thu, Jan 25, 2024 at 4:57 PM Lewis Hyatt wrote: > > > > May I p

[gcc r14-9465] libcpp: Fix macro expansion for argument of __has_include [PR110558]

2024-03-14 Thread Lewis Hyatt via Gcc-cvs
https://gcc.gnu.org/g:942497ad74272e0ef16020d628e471c5f21474b0 commit r14-9465-g942497ad74272e0ef16020d628e471c5f21474b0 Author: Lewis Hyatt Date: Tue Dec 12 17:46:36 2023 -0500 libcpp: Fix macro expansion for argument of __has_include [PR110558] When the file name for a #include

[gcc r14-9464] libcpp: Fix __has_include_next ICE in the last directory of the path [PR80755]

2024-03-14 Thread Lewis Hyatt via Gcc-cvs
https://gcc.gnu.org/g:6c166e55b15894ceb07dcc7b55f900e50e24ec5b commit r14-9464-g6c166e55b15894ceb07dcc7b55f900e50e24ec5b Author: Lewis Hyatt Date: Wed Dec 20 16:27:42 2023 -0500 libcpp: Fix __has_include_next ICE in the last directory of the path [PR80755] In libcpp/files.cc

Re: ping: [PATCH] libcpp: Fix __has_include_next ICE in the last directory of the path [PR80755]

2024-02-27 Thread Lewis Hyatt
, 2024 at 7:34 AM Lewis Hyatt wrote: > > Can I please ping this one? Thanks... > https://gcc.gnu.org/pipermail/gcc-patches/2023-December/641247.html > > -Lewis > > On Thu, Dec 21, 2023 at 7:37 AM Lewis Hyatt wrote: > > > > Hello- > > > > https

Re: [PATCH] libcpp: Improve location for macro names [PR66290]

2024-02-22 Thread Lewis Hyatt
On Thu, Feb 22, 2024 at 3:56 AM Richard Biener wrote: > > On Tue, Feb 20, 2024 at 3:33 PM Lewis Hyatt wrote: > > > > On Mon, Feb 19, 2024 at 11:36 PM Alexandre Oliva wrote: > > > > > > This backport for gcc-13 is the first of two required for the > &

Re: [PATCH] libcpp: Improve location for macro names [PR66290]

2024-02-20 Thread Lewis Hyatt
On Mon, Feb 19, 2024 at 11:36 PM Alexandre Oliva wrote: > > This backport for gcc-13 is the first of two required for the > g++.dg/pch/line-map-3.C test to stop hitting a variant of the known > problem mentioned in that testcase: on riscv64-elf and riscv32-elf, > after restoring the PCH, the

ping: [PATCH] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2024-02-16 Thread Lewis Hyatt
CCing some global reviewers as well, in case anyone has a minute to take a look please? Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638692.html On Thu, Jan 25, 2024 at 4:57 PM Lewis Hyatt wrote: > > May I please ask again about this one? It's just a couple lines,

ping: [PATCH] libcpp: Support extended characters for #pragma {push,pop}_macro [PR109704]

2024-02-10 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642926.html May I please ping this one? Thanks! On Sat, Jan 13, 2024 at 5:12 PM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109704 > > The below patch fixes the issue noted in th

Re: [PATCH] c-family: Fix ICE with large column number after restoring a PCH [PR105608]

2024-02-01 Thread Lewis Hyatt
On Thu, Feb 1, 2024 at 7:24 AM Rainer Orth wrote: > > Hi Lewis, > > > On Fri, Jan 26, 2024 at 04:16:54PM -0500, Jason Merrill wrote: > >> On 12/5/23 20:52, Lewis Hyatt wrote: > >> > Hello- > >> > > >> > https://gcc.gnu.org/bugzill

Re: [PATCH] c-family: Fix ICE with large column number after restoring a PCH [PR105608]

2024-01-31 Thread Lewis Hyatt
On Wed, Jan 31, 2024 at 03:18:01PM -0500, Jason Merrill wrote: > On 1/30/24 21:49, Lewis Hyatt wrote: > > On Fri, Jan 26, 2024 at 04:16:54PM -0500, Jason Merrill wrote: > > > On 12/5/23 20:52, Lewis Hyatt wrote: > > > > Hello- > > > > > > > &g

Re: [PATCH] c-family: Fix ICE with large column number after restoring a PCH [PR105608]

2024-01-30 Thread Lewis Hyatt
On Fri, Jan 26, 2024 at 04:16:54PM -0500, Jason Merrill wrote: > On 12/5/23 20:52, Lewis Hyatt wrote: > > Hello- > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105608 > > > > There are two related issues here really, a regression since GCC 11 where we

ping: [PATCH] c-family: Fix ICE with large column number after restoring a PCH [PR105608]

2024-01-25 Thread Lewis Hyatt
Hello- May I please ping this small patch? Thanks https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639467.html -Lewis On Wed, Dec 20, 2023 at 8:02 PM Lewis Hyatt wrote: > > Hello- > > May I please ping this PCH patch? Thanks! > https://gcc.gnu.org/pipermail/gcc-patche

ping: [PATCH] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2024-01-25 Thread Lewis Hyatt
/638692.html -Lewis On Mon, Jan 8, 2024 at 6:53 PM Lewis Hyatt wrote: > > Can I please ping this one again? It's 3 lines or so to fix the PR. Thanks! > https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638692.html > > On Tue, Dec 19, 2023 at 6:20 PM Lewis Hyatt wrote

[PATCH] libcpp: Support extended characters for #pragma {push, pop}_macro [PR109704]

2024-01-13 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109704 The below patch fixes the issue noted in the PR that extended characters cannot appear in the identifier passed to a #pragma push_macro or #pragma pop_macro. Bootstrap + regtest all languages on x86-64 Linux. Is it OK for GCC 13 please?

ping: [PATCH] libcpp: Fix __has_include_next ICE in the last directory of the path [PR80755]

2024-01-11 Thread Lewis Hyatt
Can I please ping this one? Thanks... https://gcc.gnu.org/pipermail/gcc-patches/2023-December/641247.html -Lewis On Thu, Dec 21, 2023 at 7:37 AM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80755 > > Here is a short fix for the ICE in libc

ping^3: [PATCH] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2024-01-08 Thread Lewis Hyatt
Can I please ping this one again? It's 3 lines or so to fix the PR. Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638692.html On Tue, Dec 19, 2023 at 6:20 PM Lewis Hyatt wrote: > > Hello- > > May I please ping this one? Thanks... > https://gcc.gnu.org/pipermail/g

Re: [PATCH v2] libstdc++: Add Unicode-aware width estimation for std::format

2024-01-06 Thread Lewis Hyatt
On Sat, Jan 6, 2024 at 11:40 AM Jonathan Wakely wrote: > > Here's a V2 patch which addresses the two things I mentioned: the new > Python script now generates a complete file that can just be included by > , and the full Unicode 15.1.0 grapheme cluster break > rules are supported (I think ...

ping: [PATCH] libcpp: Fix macro expansion for argument of __has_include [PR110558]

2024-01-03 Thread Lewis Hyatt
Hello- May I please ping this one? Thanks... https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640386.html -Lewis On Tue, Dec 12, 2023 at 6:18 PM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110558 > > This is a small fix for the

[PATCH] libcpp: Fix __has_include_next ICE in the last directory of the path [PR80755]

2023-12-21 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80755 Here is a short fix for the ICE in libcpp noted in the PR. Bootstrap + regtest all languages on x86-64 Linux. Is it OK please? Thanks! -Lewis -- >8 -- In libcpp/files.cc, the function _cpp_has_header(), which implements __has_include

Re: [PATCH] c-family: Fix ICE with large column number after restoring a PCH [PR105608]

2023-12-20 Thread Lewis Hyatt
Hello- May I please ping this PCH patch? Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639467.html -Lewis On Tue, Dec 5, 2023 at 8:52 PM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105608 > > There are two related

ping^2: [PATCH] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2023-12-19 Thread Lewis Hyatt
Hello- May I please ping this one? Thanks... https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638692.html -Lewis On Wed, Nov 29, 2023 at 7:05 PM Lewis Hyatt wrote: > > On Thu, Nov 09, 2023 at 04:16:10PM -0500, Lewis Hyatt wrote: > > https://gcc.gnu.org/bugzilla/show_bug.c

[PATCH] libcpp: Fix macro expansion for argument of __has_include [PR110558]

2023-12-12 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110558 This is a small fix for the libcpp issue noted in the PR. Bootstrap + regtest all languages on x86-64 Linux. Is it ok for trunk please? Also, it's not a regression, having never worked since __has_include was introduced in GCC 5, but

[PATCH] c-family: Fix ICE with large column number after restoring a PCH [PR105608]

2023-12-05 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105608 There are two related issues here really, a regression since GCC 11 where we can ICE after restoring a PCH, and a deeper issue with bogus locations assigned to macros that were defined prior to restoring a PCH. This patch fixes the ICE

Re: [PATCH] preprocessor: Reinitialize frontend parser after loading a PCH [PR112319]

2023-11-30 Thread Lewis Hyatt
On Thu, Nov 30, 2023 at 4:19 PM Marek Polacek wrote: > > On Wed, Nov 01, 2023 at 05:54:57PM -0400, Lewis Hyatt wrote: > > Hello- > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319 > > > > This is a one-line patch to fix the GCC 14 regression noted in

ping: [PATCH] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2023-11-29 Thread Lewis Hyatt
On Thu, Nov 09, 2023 at 04:16:10PM -0500, Lewis Hyatt wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111918 > > This patch fixes the behavior of `#pragma GCC diagnostic pop' for permissive > error diagnostics such as -Wnarrowing (in C++11). Those currently do not > return

[PATCH] libcpp: Fix unsigned promotion for unevaluated divide by zero [PR112701]

2023-11-27 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112701 Here is a one-line fix to an edge case in libcpp's expression evaluator noted in the PR. Bootstrap + regtest all languages on x86-64 Linux. Is it OK please? Thanks! -Lewis -- >8 -- When libcpp encounters a divide by zero while

[PATCH] Makefile.tpl: Avoid race condition in generating site.exp from the top level

2023-11-17 Thread Lewis Hyatt
Hello- I often find it convenient to run a new c-c++-common test from the main build dir like: $ make -j 2 RUNTESTFLAGS=dg.exp=new-test.c check-gcc-{c,c++} I noticed that sometimes this produces a corrupted site.exp and then no tests work until it is remade manually. To avoid the issue, it is

ping: [PATCH] preprocessor: Reinitialize frontend parser after loading a PCH [PR112319]

2023-11-17 Thread Lewis Hyatt
May I please ping this one? Thanks... https://gcc.gnu.org/pipermail/gcc-patches/2023-November/634931.html On Wed, Nov 1, 2023 at 5:55 PM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319 > > This is a one-line patch to fix the GCC 1

[PATCH] c-family: Let libcpp know when the compilation is for a PCH [PR9471]

2023-11-10 Thread Lewis Hyatt
Hello- The PR may be 20 years old, but by now it only needs a one-line fix :). Is it OK please? Bootstrapped + regtested all langauges on x86-64 Linux. Thanks! -Lewis https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9471 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47857 -- >8 -- libcpp will

[PATCH] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2023-11-09 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111918 This patch fixes the behavior of `#pragma GCC diagnostic pop' for permissive error diagnostics such as -Wnarrowing (in C++11). Those currently do not return to the correct state after the last pop; they become effectively simple warnings

[PATCH] diagnostics: pch: Remember diagnostic pragmas in a PCH [PR64117]

2023-11-07 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117 This fixes an old PR / enhancement request. Bootstrap + regtest all languages on x86-64 Linux. Please let me know if it looks OK? Thanks! -Lewis -- >8 -- As the PR points out, we do not currently record in a PCH whether any diagnostics

Re: [PATCH 1/2] libdiagnostics: header and examples

2023-11-07 Thread Lewis Hyatt
On Mon, Nov 6, 2023 at 8:29 PM David Malcolm wrote: > > Here's a work-in-progress patch for GCC that adds a libdiagnostics.h > header describing the public interface, along with various testcases > that show usage examples for the API. Various aspects of this need > work; posting now for early

[PATCH] preprocessor: Reinitialize frontend parser after loading a PCH [PR112319]

2023-11-01 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319 This is a one-line patch to fix the GCC 14 regression noted in the PR. Bootstrap + regtest all languages on x86-64 looks good. Is it OK please? Thanks! -Lewis -- >8 -- Since r14-2893, the frontend parser object needs to exist when

Re: [PATCH] libcpp: Improve the diagnostic for poisoned identifiers [PR36887]

2023-10-26 Thread Lewis Hyatt
On Thu, Oct 26, 2023 at 12:48 PM Christophe Lyon wrote: > > On Thu, 26 Oct 2023 at 18:18, Lewis Hyatt wrote: > > > > On Thu, Oct 26, 2023 at 4:49 AM Christophe Lyon > > wrote: > > > We have noticed that the new tests fail on aarch64 with: > > > .../aar

Re: [PATCH] libcpp: Improve the diagnostic for poisoned identifiers [PR36887]

2023-10-26 Thread Lewis Hyatt
On Thu, Oct 26, 2023 at 4:49 AM Christophe Lyon wrote: > We have noticed that the new tests fail on aarch64 with: > .../aarch64-unknown-linux-gnu/libc/usr/lib/crt1.o: in function `_start': > .../sysdeps/aarch64/start.S:110:(.text+0x38): undefined reference to `main' > > Looking at the test, I'd

ping: [PATCH] libcpp: Improve the diagnostic for poisoned identifiers [PR36887]

2023-10-20 Thread Lewis Hyatt
Hello- May I please ping this one? Thanks... https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630967.html -Lewis On Wed, Sep 20, 2023 at 12:12 AM Lewis Hyatt wrote: > > Hello- > > This patch implements the PR's request to add more information to the > diagnostic i

Re: [PATCH] c++: Make -Wunknown-pragmas controllable by #pragma GCC diagnostic [PR89038]

2023-10-19 Thread Lewis Hyatt
On Thu, Oct 19, 2023 at 8:43 AM Marek Polacek wrote: > > On Wed, Oct 18, 2023 at 05:15:42PM -0400, Lewis Hyatt wrote: > > Hello- > > > > The PR points out that my fix for PR53431 was incomplete and did not handle > > -Wunknown-pragmas. This is a one-line

[PATCH] c++: Make -Wunknown-pragmas controllable by #pragma GCC diagnostic [PR89038]

2023-10-18 Thread Lewis Hyatt
Hello- The PR points out that my fix for PR53431 was incomplete and did not handle -Wunknown-pragmas. This is a one-line fix to correct that, is it OK for trunk and for GCC 13 backport please? bootstrap + regtest all languages on x86-64 Linux. Thanks! -Lewis -- >8 -- As noted on the PR, commit

Re: [PATCH] libcpp: testsuite: Add test for fixed _Pragma bug [PR82335]

2023-10-18 Thread Lewis Hyatt
May I please ping this one, and/or, is it something straightforward enough I can just commit it as obvious? Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2023-October/631814.html -Lewis On Mon, Oct 2, 2023 at 6:23 PM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.

ping: [PATCH] preprocessor: c++: Support `#pragma GCC target' macros [PR87299]

2023-10-13 Thread Lewis Hyatt
On Tue, Sep 12, 2023 at 04:09:21PM -0400, Lewis Hyatt wrote: > On Tue, Aug 8, 2023 at 5:53 PM Jason Merrill wrote: > > > > On 7/31/23 22:22, Lewis Hyatt via Gcc-patches wrote: > > > `#pragma GCC target' is not currently handled in preprocess-only mode > > >

[PATCH] libcpp: testsuite: Add test for fixed _Pragma bug [PR82335]

2023-10-02 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82335 is another _Pragma-related bug that got fixed in GCC 12 but is still open. Before closing it out, I thought it would be good to add the testcase from that PR, which we don't have exactly in the testsuite already. Is it OK please? Thanks!

[PATCH] libcpp: Improve the diagnostic for poisoned identifiers [PR36887]

2023-09-19 Thread Lewis Hyatt
Hello- This patch implements the PR's request to add more information to the diagnostic issued for using a poisoned identifier. Bootstrapped + regtested all languages on x86-64 Linux. Does it look OK please? Thanks! -Lewis -- >8 -- The PR requests an enhancement to the diagnostic issued for

Re: [PATCH] libcpp: Fix ICE on #include after a line marker directive [PR61474]

2023-09-19 Thread Lewis Hyatt
On Tue, Sep 19, 2023 at 1:13 PM Marek Polacek wrote: > > On Tue, Sep 19, 2023 at 06:08:50PM +0100, Richard Sandiford wrote: > > Lewis Hyatt via Gcc-patches writes: > > > Hello- > > > > > > This fixes an old PR, bootstrap + regtest on x86-64 Linux. Pleas

[PATCH] libcpp: Fix ICE on #include after a line marker directive [PR61474]

2023-09-15 Thread Lewis Hyatt via Gcc-patches
Hello- This fixes an old PR, bootstrap + regtest on x86-64 Linux. Please let me know if it's ok? Thanks! -Lewis -- >8 -- As noted in the PR, GCC will segfault if a file name is first seen in a linemarker directive, and then later seen in a normal #include. This is because the fake include

Re: [PATCH] preprocessor: c++: Support `#pragma GCC target' macros [PR87299]

2023-09-12 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 8, 2023 at 5:53 PM Jason Merrill wrote: > > On 7/31/23 22:22, Lewis Hyatt via Gcc-patches wrote: > > `#pragma GCC target' is not currently handled in preprocess-only mode (e.g., > > when running gcc -E or gcc -save-temps). As noted in the PR, this means that > &

Ping: [PATCH] testsuite: Add test for already-fixed issue with _Pragma expansion [PR90400]

2023-09-08 Thread Lewis Hyatt via Gcc-patches
Hello- May I please ping this one? It's adding a testcase prior to closing the PR. Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628488.html -Lewis On Fri, Aug 25, 2023 at 4:46 PM Lewis Hyatt wrote: > > Hello- > > This is adding a testcase for a PR that was already

[PATCH] testsuite: Add test for already-fixed issue with _Pragma expansion [PR90400]

2023-08-25 Thread Lewis Hyatt via Gcc-patches
Hello- This is adding a testcase for a PR that was already incidentally fixed. OK to commit please? Thanks... -Lewis -- >8 -- The PR was fixed by r12-5454. Since the fix was somewhat incidental, although related, add a testcase from PR90400 too before closing it out. gcc/testsuite/ChangeLog:

Re: [PATCH v4 3/8] diagnostics: Refactor class file_cache_slot

2023-08-23 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 03:39:40PM -0400, David Malcolm wrote: > On Tue, 2023-08-15 at 13:58 -0400, Lewis Hyatt wrote: > > On Tue, Aug 15, 2023 at 11:43:05AM -0400, David Malcolm wrote: > > > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > > > Class file_

Re: [PATCH v4 4/8] diagnostics: Support obtaining source code lines from generated data buffers

2023-08-23 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 04:08:47PM -0400, Lewis Hyatt wrote: > On Tue, Aug 15, 2023 at 3:46 PM David Malcolm wrote: > > > > On Tue, 2023-08-15 at 14:15 -0400, Lewis Hyatt wrote: > > > On Tue, Aug 15, 2023 at 12:15:15PM -0400, David Malcolm wrote: > > > > On W

Re: [PATCH v4 4/8] diagnostics: Support obtaining source code lines from generated data buffers

2023-08-15 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 3:46 PM David Malcolm wrote: > > On Tue, 2023-08-15 at 14:15 -0400, Lewis Hyatt wrote: > > On Tue, Aug 15, 2023 at 12:15:15PM -0400, David Malcolm wrote: > > > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > > > This patch

Re: [PATCH v4 4/8] diagnostics: Support obtaining source code lines from generated data buffers

2023-08-15 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 12:15:15PM -0400, David Malcolm wrote: > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > This patch enhances location_get_source_line(), which is the primary > > interface provided by the diagnostics infrastructure to obtain the line of

Re: [PATCH v4 3/8] diagnostics: Refactor class file_cache_slot

2023-08-15 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 11:43:05AM -0400, David Malcolm wrote: > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > Class file_cache_slot in input.cc is used to query specific lines of source > > code from a file when needed by diagnostics infrastructure. This will

Re: [PATCH v4 8/8] diagnostics: Support generated data locations in SARIF output

2023-08-15 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 01:04:04PM -0400, David Malcolm wrote: > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > The diagnostics routines for SARIF output need to read the source code back > > in, so that they can generate "snippet" and "content" record

Re: [PATCH v4 2/8] libcpp: diagnostics: Support generated data in expanded locations

2023-08-14 Thread Lewis Hyatt via Gcc-patches
On Fri, Aug 11, 2023 at 07:02:49PM -0400, David Malcolm wrote: > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > The previous patch in this series introduced the concept of LC_GEN line > > maps. This patch continues on the path to using them to improve _Pragma > > d

Re: [PATCH v4 1/8] libcpp: Add LC_GEN linemaps to support in-memory buffers

2023-08-13 Thread Lewis Hyatt via Gcc-patches
On Fri, Aug 11, 2023 at 06:45:31PM -0400, David Malcolm wrote: > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > Hi Lewis, thanks for the patch... > > > Add a new linemap reason LC_GEN which enables encoding the location of data > > that was generated dur

[PATCH v4 7/8] diagnostics: libcpp: Assign real locations to the tokens inside _Pragma strings

2023-08-09 Thread Lewis Hyatt via Gcc-patches
Currently, the tokens obtained from a destringified _Pragma string do not get assigned proper locations while they are being lexed. After the tokens have been obtained, they are reassigned the same location as the _Pragma token, which is sufficient to make things like _Pragma("GCC diagnostic

[PATCH v4 6/8] diagnostics: Full support for generated data locations

2023-08-09 Thread Lewis Hyatt via Gcc-patches
Previous patches in this series have laid the groundwork for supporting source code locations in memory ("generated data") rather than ordinary files. This patch completes the support by adding awareness of such locations to all places that need to support them. The main changes are to

[PATCH v4 5/8] diagnostics: Support testing generated data in input.cc selftests

2023-08-09 Thread Lewis Hyatt via Gcc-patches
Add selftests for the new capabilities in input.cc related to source code locations that are stored in memory rather than ordinary files. gcc/ChangeLog: * input.cc (temp_source_file::do_linemap_add): New function. (line_table_case::line_table_case): Add GENERATED_DATA argument.

[PATCH v4 3/8] diagnostics: Refactor class file_cache_slot

2023-08-09 Thread Lewis Hyatt via Gcc-patches
Class file_cache_slot in input.cc is used to query specific lines of source code from a file when needed by diagnostics infrastructure. This will be extended in a subsequent patch to support obtaining the source code from in-memory generated buffers rather than from a file. The present patch

[PATCH v4 4/8] diagnostics: Support obtaining source code lines from generated data buffers

2023-08-09 Thread Lewis Hyatt via Gcc-patches
This patch enhances location_get_source_line(), which is the primary interface provided by the diagnostics infrastructure to obtain the line of source code corresponding to a given location, so that it understands generated data locations in addition to normal file-based locations. This involves

[PATCH v4 8/8] diagnostics: Support generated data locations in SARIF output

2023-08-09 Thread Lewis Hyatt via Gcc-patches
The diagnostics routines for SARIF output need to read the source code back in, so that they can generate "snippet" and "content" records, so they need to be able to cope with generated data locations. Add support for that in diagnostic-format-sarif.cc. gcc/ChangeLog: *

[PATCH v4 1/8] libcpp: Add LC_GEN linemaps to support in-memory buffers

2023-08-09 Thread Lewis Hyatt via Gcc-patches
Add a new linemap reason LC_GEN which enables encoding the location of data that was generated during compilation and does not appear in any source file. There could be many use cases, such as, for instance, referring to the content of builtin macros (not yet implemented, but an easy lift after

[PATCH v4 2/8] libcpp: diagnostics: Support generated data in expanded locations

2023-08-09 Thread Lewis Hyatt via Gcc-patches
The previous patch in this series introduced the concept of LC_GEN line maps. This patch continues on the path to using them to improve _Pragma diagnostics, by adding a new source_id SRC member to struct expanded_location, which is populated by linemap_expand_location. This member allows call

[PATCH v4 0/8] diagnostics: libcpp: Overhaul locations for _Pragma tokens

2023-08-09 Thread Lewis Hyatt via Gcc-patches
On Mon, Jul 31, 2023 at 06:39:15PM -0400, Lewis Hyatt wrote: > On Fri, Jul 28, 2023 at 6:58 PM David Malcolm wrote: > > > > On Fri, 2023-07-21 at 19:08 -0400, Lewis Hyatt wrote: > > > Add a new linemap reason LC_GEN which enables encoding the location > > > of dat

Re: [PATCH] preprocessor: c++: Support `#pragma GCC target' macros [PR87299]

2023-08-09 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 1, 2023 at 11:01 AM Joseph Myers wrote: > > On Mon, 31 Jul 2023, Lewis Hyatt via Gcc-patches wrote: > > > I added some additional testcases from the PR for x86. The other targets > > that support `#pragma GCC target' (aarch64, arm, nios2, powerpc, s390) > >

[PATCH] preprocessor: c++: Support `#pragma GCC target' macros [PR87299]

2023-07-31 Thread Lewis Hyatt via Gcc-patches
`#pragma GCC target' is not currently handled in preprocess-only mode (e.g., when running gcc -E or gcc -save-temps). As noted in the PR, this means that if the target pragma defines any macros, those macros are not effective in preprocess-only mode. Similarly, such macros are not effective when

Re: [PATCH v3 1/4] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers

2023-07-31 Thread Lewis Hyatt via Gcc-patches
On Fri, Jul 28, 2023 at 6:58 PM David Malcolm wrote: > > On Fri, 2023-07-21 at 19:08 -0400, Lewis Hyatt wrote: > > Add a new linemap reason LC_GEN which enables encoding the location > > of data > > that was generated during compilation and does not appear in any > >

Re: [PATCH v3 0/4] diagnostics: libcpp: Overhaul locations for _Pragma tokens

2023-07-29 Thread Lewis Hyatt via Gcc-patches
On Fri, Jul 28, 2023 at 6:22 PM David Malcolm wrote: > > On Fri, 2023-07-21 at 19:08 -0400, Lewis Hyatt wrote: > > Hello- > > > > This is an update to the v2 patch series last sent in January: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609473.html &

Re: [PATCH v2] c-family: Implement pragma_lex () for preprocess-only mode

2023-07-28 Thread Lewis Hyatt via Gcc-patches
On Thu, Jul 27, 2023 at 06:18:33PM -0700, Jason Merrill wrote: > On 7/27/23 18:59, Lewis Hyatt wrote: > > In order to support processing #pragma in preprocess-only mode (-E or > > -save-temps for gcc/g++), we need a way to obtain the #pragma tokens from > > libcpp. In f

[PATCH v2] c-family: Implement pragma_lex () for preprocess-only mode

2023-07-27 Thread Lewis Hyatt via Gcc-patches
In order to support processing #pragma in preprocess-only mode (-E or -save-temps for gcc/g++), we need a way to obtain the #pragma tokens from libcpp. In full compilation modes, this is accomplished by calling pragma_lex (), which is a symbol that must be exported by the frontend, and which is

Re: [PATCH] c-family: Implement pragma_lex () for preprocess-only mode

2023-07-26 Thread Lewis Hyatt via Gcc-patches
On Wed, Jul 26, 2023 at 5:36 PM Jason Merrill wrote: > > On 6/30/23 18:59, Lewis Hyatt wrote: > > In order to support processing #pragma in preprocess-only mode (-E or > > -save-temps for gcc/g++), we need a way to obtain the #pragma tokens from > > libcpp. I

Re: [PATCH] c-family: Implement pragma_lex () for preprocess-only mode

2023-07-26 Thread Lewis Hyatt via Gcc-patches
May I please ping this? I am just about ready with the followup patch that fixes PR87299, but it depends on this one. Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2023-June/623364.html -Lewis On Fri, Jun 30, 2023 at 6:59 PM Lewis Hyatt wrote: > > In order to support processing #

[PATCH v3 1/4] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers

2023-07-21 Thread Lewis Hyatt via Gcc-patches
Add a new linemap reason LC_GEN which enables encoding the location of data that was generated during compilation and does not appear in any source file. There could be many use cases, such as, for instance, referring to the content of builtin macros (not yet implemented, but an easy lift after

[PATCH v3 3/4] diagnostics: libcpp: Assign real locations to the tokens inside _Pragma strings

2023-07-21 Thread Lewis Hyatt via Gcc-patches
Currently, the tokens obtained from a destringified _Pragma string do not get assigned proper locations while they are being lexed. After the tokens have been obtained, they are reassigned the same location as the _Pragma token, which is sufficient to make things like _Pragma("GCC diagnostic

[PATCH v3 4/4] diagnostics: Support generated data locations in SARIF output

2023-07-21 Thread Lewis Hyatt via Gcc-patches
The diagnostics routines for SARIF output need to read the source code back in, so that they can generate "snippet" and "content" records, so they need to be able to cope with generated data locations. Add support for that in diagnostic-format-sarif.cc. gcc/ChangeLog: *

[PATCH v3 2/4] diagnostics: Handle generated data locations in edit_context

2023-07-21 Thread Lewis Hyatt via Gcc-patches
Class edit_context handles outputting fixit hints in diff form that could be manually or automatically applied by the user. This will not make sense for generated data locations, such as the contents of a _Pragma string, because the text to be modified does not appear in the user's input files. We

[PATCH v3 0/4] diagnostics: libcpp: Overhaul locations for _Pragma tokens

2023-07-21 Thread Lewis Hyatt via Gcc-patches
Hello- This is an update to the v2 patch series last sent in January: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609473.html While I did not receive any feedback on the v2 patches yet, they did need some rebasing on top of other recent commits to input.cc, so I thought it would be

[committed] testsuite: Fix C++ UDL tests failing on 32-bit arch [PR103902]

2023-07-19 Thread Lewis Hyatt via Gcc-patches
These tests need to use "size_t" rather than "unsigned long" for the user-defined literal function arguments. gcc/testsuite/ChangeLog: PR preprocessor/103902 * g++.dg/cpp0x/udlit-extended-id-1.C: Change "unsigned long" to "size_t" throughout. *

Ping: [PATCH v2] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-07-11 Thread Lewis Hyatt via Gcc-patches
May I please ping this patch again? I think it would be worthwhile to close this gap in the support for UTF-8 sources. Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613247.html -Lewis On Fri, Jun 2, 2023 at 9:45 AM Lewis Hyatt wrote: > > Hello- > > Ping please? Tha

Re: 'unsigned int len' field in 'libcpp/include/symtab.h:struct ht_identifier' (was: [PATCH] pch: Fix streaming of strings with embedded null bytes)

2023-07-04 Thread Lewis Hyatt via Gcc-patches
clude/symtab.h:struct ht_identifier': > > On 2022-10-18T18:14:54-0400, Lewis Hyatt via Gcc-patches > wrote: > > When a GTY'ed struct is streamed to PCH, any plain char* pointers it > > contains > > (whether they live in GC-controlled memory or not) will be marked for

[PATCH] c-family: Implement pragma_lex () for preprocess-only mode

2023-06-30 Thread Lewis Hyatt via Gcc-patches
In order to support processing #pragma in preprocess-only mode (-E or -save-temps for gcc/g++), we need a way to obtain the #pragma tokens from libcpp. In full compilation modes, this is accomplished by calling pragma_lex (), which is a symbol that must be exported by the frontend, and which is

Re: ping: [PATCH] libcpp: Improve location for macro names [PR66290]

2023-06-19 Thread Lewis Hyatt via Gcc-patches
023 at 6:31 PM Lewis Hyatt wrote: > > https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607647.html > May I please ping this one again? It will enable closing out the PR. Thanks! > > -Lewis > > On Thu, Dec 1, 2022 at 9:22 AM Lewis Hyatt wrote: > > > > Hello- &

Re: [pushed] diagnostics: ensure that .sarif files are UTF-8 encoded [PR109098]

2023-06-11 Thread Lewis Hyatt via Gcc-patches
On Fri, Mar 24, 2023 at 9:04 PM David Malcolm via Gcc-patches wrote: > > PR analyzer/109098 notes that the SARIF spec mandates that .sarif > files are UTF-8 encoded, but -fdiagnostics-format=sarif-file naively > assumes that the source files are UTF-8 encoded when quoting source > artefacts in

Ping: [PATCH v2] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-06-02 Thread Lewis Hyatt via Gcc-patches
Hello- Ping please? Thanks. https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613247.html -Lewis On Tue, May 2, 2023 at 9:27 AM Lewis Hyatt wrote: > > May I please ping this one? Thanks... > https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613247.html > > On Thu, Mar 2,

Ping: [PATCH v2] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-05-02 Thread Lewis Hyatt via Gcc-patches
May I please ping this one? Thanks... https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613247.html On Thu, Mar 2, 2023 at 6:21 PM Lewis Hyatt wrote: > > The PR complains that we do not handle UTF-8 in the suffix for a user-defined > literal, such as: > > bool operator &quo

Ping: [PATCH v2] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-04-04 Thread Lewis Hyatt via Gcc-patches
May I please ping this one? https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613247.html Thanks! -Lewis On Thu, Mar 2, 2023 at 6:21 PM Lewis Hyatt wrote: > > The PR complains that we do not handle UTF-8 in the suffix for a user-defined > literal, such as: > > bool operator

Re: [PATCH] libcpp: Update to Unicode 15

2023-03-09 Thread Lewis Hyatt via Gcc-patches
On Fri, Nov 04, 2022 at 10:03:13AM +0100, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The following pseudo-patch (for uname2c.h part > just a pseudo patch with a lot of changes replaced with ... > because it is too large but the important changes like > -static const char uname2c_dict[59418] =

Ping: [PATCH] libcpp: Fix ICE on directive inside _Pragma() operator [PR67046]

2023-03-07 Thread Lewis Hyatt via Gcc-patches
Hello- May I please ping this short patch that fixes an old bug? Thanks... -Lewis On Sat, Jan 14, 2023 at 1:46 PM Lewis Hyatt wrote: > > get__Pragma_string() in directives.cc is responsible for lexing the parens > and the string argument from a _Pragma("...") operator.

[PATCH v2] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-03-02 Thread Lewis Hyatt via Gcc-patches
The PR complains that we do not handle UTF-8 in the suffix for a user-defined literal, such as: bool operator ""_π (unsigned long long); In fact we don't handle any extended identifier characters there, whether UTF-8, UCNs, or the $ sign. We do handle it fine if the optional space after the ""

Re: Ping^3: [PATCH] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-02-15 Thread Lewis Hyatt via Gcc-patches
On Wed, Feb 15, 2023 at 1:39 PM Jason Merrill wrote: > > On 9/26/22 15:27, Lewis Hyatt wrote: > > On Wed, Jun 15, 2022 at 03:06:16PM -0400, Lewis Hyatt wrote: > >> On Tue, Jun 14, 2022 at 05:26:49PM -0400, Lewis Hyatt wrote: > >>> Hello- > >>> >

Re: Ping^3: [PATCH] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-02-10 Thread Lewis Hyatt via Gcc-patches
On Fri, Feb 10, 2023 at 11:30 AM Jakub Jelinek wrote: > > On Mon, Sep 26, 2022 at 06:27:25PM -0400, Lewis Hyatt via Gcc-patches wrote: > > May I please ping this patch again? Joseph suggested that it would be best > > if > > a C++ maintainer has a look at it. This is

[PATCH] libcpp: Fix ICE on directive inside _Pragma() operator [PR67046]

2023-01-14 Thread Lewis Hyatt via Gcc-patches
get__Pragma_string() in directives.cc is responsible for lexing the parens and the string argument from a _Pragma("...") operator. This function does not handle the case when the closing paren is not on the same line as the string; in that case, libcpp will by default reuse the token buffer it

ping: [PATCH] libcpp: Improve location for macro names [PR66290]

2023-01-12 Thread Lewis Hyatt via Gcc-patches
https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607647.html May I please ping this one again? It will enable closing out the PR. Thanks! -Lewis On Thu, Dec 1, 2022 at 9:22 AM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599397.ht

[PATCH v2 3/4] diagnostics: libcpp: Assign real locations to the tokens inside _Pragma strings

2023-01-05 Thread Lewis Hyatt via Gcc-patches
Currently, the tokens obtained from a destringified _Pragma string do not get assigned proper locations while they are being lexed. After the tokens have been obtained, they are reassigned the same location as the _Pragma token, which is sufficient to make things like _Pragma("GCC diagnostic

[PATCH v2 1/4] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers

2023-01-05 Thread Lewis Hyatt via Gcc-patches
Add a new linemap reason LC_GEN which enables encoding the location of data that was generated during compilation and does not appear in any source file. There could be many use cases, such as, for instance, referring to the content of builtin macros (not yet implemented, but an easy lift after

[PATCH v2 4/4] diagnostics: Support generated data locations in SARIF output

2023-01-05 Thread Lewis Hyatt via Gcc-patches
The diagnostics routines for SARIF output need to read the source code back in, so that they can generate "snippet" and "content" records, so they need to be able to cope with generated data locations. Add support for that in diagnostic-format-sarif.cc. gcc/ChangeLog: *

[PATCH v2 2/4] diagnostics: Handle generated data locations in edit_context

2023-01-05 Thread Lewis Hyatt via Gcc-patches
Class edit_context handles outputting fixit hints in diff form that could be manually or automatically applied by the user. This will not make sense for generated data locations, such as the contents of a _Pragma string, because the text to be modified does not appear in the user's input files. We

  1   2   3   >