[C++] Deprecate old for-scope handling

Jason Merrill jason@redhat.com
Mon Jan 22 16:33:00 GMT 2018


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



More information about the Gcc-patches mailing list