This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] Deprecate old for-scope handling
- From: Jason Merrill <jason at redhat dot com>
- To: Eric Gallager <egall at gwmail dot gwu dot edu>
- Cc: Nathan Sidwell <nathan at acm dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 22 Jan 2018 10:57:33 -0500
- Subject: Re: [C++] Deprecate old for-scope handling
- Authentication-results: sourceware.org; auth=none
- References: <75017120-5043-e780-e939-c08792f691cc@acm.org> <CAMfHzOt+OLZpBgrjHgnMzx=6ikyOsTx7yjc1y5T7gVi0=WZfWw@mail.gmail.com>
On Sun, Jan 21, 2018 at 1:40 AM, Eric Gallager <egall@gwmail.gwu.edu> wrote:
> On 1/19/18, Nathan Sidwell <nathan@acm.org> wrote:
>> Jason,
>> what do you think about deprecating the ARM-era for-scope handling that
>> allows:
>> void f ()
>> {
>> for (int i = 0;;);
>> i = 2;
>> }
>>
>> we noisily accept that in c++98 mode with -fpermissive. It wasn't even
>> well formed then. Implementing this has some unique requirements in the
>> name-lookup machinery, which I ran into again today.
>>
>> Option A: rip out now because it's a c++98 ARM-compatibility crutch
>> Option B: deprecate in gcc-8 and remove in gcc-9.
>
> I support Option B because it's good to let people know ahead of time
> about impending removals of things
I'd just remove it in GCC 9. I think the existing permerror already
qualifies as deprecation, but I wouldn't object to adjusting the
diagnostic to mention this plan. I wouldn't want to tear it out at
this stage of GCC 8.
Jason