Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-22 Thread Kaz Kylheku
On 2024-03-21 18:40, Andrew Pinski wrote: On Thu, Mar 21, 2024, 17:20 Kaz Kylheku wrote: For instance, suppose we have a macro that expands to some block of code in which there is an internal goto. If we have it #define MAC(...) { ... goto _label; ... __label: ; } then this cannot be used

Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-21 Thread Andrew Pinski
On Thu, Mar 21, 2024, 17:20 Kaz Kylheku wrote: > On 2024-03-20 16:34, rep.dot@gmail.com wrote: > > On 19 March 2024 18:27:13 CET, Kaz Kylheku wrote: > >>On 2024-03-18 00:30, Jonathan Wakely wrote: > >>> I don't have an opinion on the implementation, or the proposal itself, > >>> except that

Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-21 Thread Kaz Kylheku
On 2024-03-20 16:34, rep.dot@gmail.com wrote: > On 19 March 2024 18:27:13 CET, Kaz Kylheku wrote: >>On 2024-03-18 00:30, Jonathan Wakely wrote: >>> I don't have an opinion on the implementation, or the proposal itself, >>> except that the implementation seems susprisingly simple, which is >>>

Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-20 Thread rep . dot . nop
On 19 March 2024 18:27:13 CET, Kaz Kylheku wrote: >On 2024-03-18 00:30, Jonathan Wakely wrote: >> I don't have an opinion on the implementation, or the proposal itself, >> except that the implementation seems susprisingly simple, which is >> nice. > >Hi Jonathan, > >Here is an updated patch. >

Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-19 Thread Kaz Kylheku
fied. In the first test case, I had to adjust the expected warning text for two lines. From 65effbcac172e8bb1a89f0621b3de6cdcb8dbab2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 20 Apr 2022 01:15:24 -0700 Subject: [PATCH] cpp: new built-in __EXP_COUNTER__ This change introduces a pai

Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-18 Thread Jonathan Wakely
On Mon, 18 Mar 2024 at 16:46, Kaz Kylheku wrote: > > On 2024-03-18 00:30, Jonathan Wakely wrote: > >>+@item __EXP_COUNTER__ > >>+This macro's name means "(macro) expansion counter". > >>+Outside of macro replacement sequences, it expands to the integer > >>+token @code{1}. This make it possible

Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-18 Thread Kaz Kylheku
On 2024-03-18 00:30, Jonathan Wakely wrote: >>+@item __EXP_COUNTER__ >>+This macro's name means "(macro) expansion counter". >>+Outside of macro replacement sequences, it expands to the integer >>+token @code{1}. This make it possible to easily test for the presence >>+of this feature using

Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-18 Thread Jonathan Wakely
On 18/03/24 07:30 +, Jonathan Wakely wrote: On 21/04/22 04:31 -0700, Kaz Kylheku wrote: libcpp/ChangeLog 2022-04-21 Kaz Kylheku This change introduces a pair of related macros __EXP_COUNTER__ and __UEXP_COUNTER__. These macros access integer values which

Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-18 Thread Jonathan Wakely
On 21/04/22 04:31 -0700, Kaz Kylheku wrote: libcpp/ChangeLog 2022-04-21 Kaz Kylheku This change introduces a pair of related macros __EXP_COUNTER__ and __UEXP_COUNTER__. These macros access integer values which enumerate macro expansions. They can be used for

[PATCH] cpp: new built-in __EXP_COUNTER__

2022-04-21 Thread Kaz Kylheku via Gcc-patches
libcpp/ChangeLog 2022-04-21 Kaz Kylheku This change introduces a pair of related macros __EXP_COUNTER__ and __UEXP_COUNTER__. These macros access integer values which enumerate macro expansions. They can be used for the purposes of obtaining, unique