This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: reject vars whose types have no linkage


On 17 Feb 2005 22:49:32 -0200, Alexandre Oliva <aoliva@redhat.com> wrote:

> On Feb 17, 2005, Alexandre Oliva <aoliva@redhat.com> wrote:
>
>> The relevant DRs seem to all point towards rejecting such code.  Since
>> -fpermissive is always an option to let pedwarns through, I thought
>> we'd be better off rejecting both, as per the current DR resolutions.
>
> FWIW, this patch regressed g++.dg/lookup/anon3.C, which introduces the
> conflicting requirement with anon2.C.  I suppose we should use warning
> instead of pedwarn, giving users early warning that the code is
> nonsensical and almost certainly will become ill-formed, although
> still acceptable by the current standard.  Then we'll be
> forward-compatible with the revised standard, since we'll issue a
> diagnostic, and also compatible with the current standard, since the
> code is accepted.  Comments?

Yes, I think that's the right approach.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]