[PATCH] explicit GNU flags

Eli Friedman eli.friedman at gmail.com
Sat Aug 17 23:05:04 PDT 2013


On Sat, Aug 17, 2013 at 9:45 PM, Dmitri Gribenko <gribozavr at gmail.com>wrote:

> On Fri, Aug 16, 2013 at 11:59 PM, Eli Friedman <eli.friedman at gmail.com>
> wrote:
> > On Fri, Aug 16, 2013 at 11:49 PM, Peter N Lewis <peter at stairways.com.au>
> > wrote:
> >>
> >> On 17/08/2013, at 5:22 , Eli Friedman <eli.friedman at gmail.com> wrote:
> >> > diag::ext_gnu_local_label shouldn't exist; it's not something we need
> to
> >> > diagnose.
> >>
> >> Is it not a GNU extension to have local labels?
> >
> >
> > Yes.
> >
> >>
> >> Are you suggesting the I delete the diagnostic for local labels, or not
> >> add the explicit flag for that diagnostic?
> >
> >
> > I'm suggesting you delete the diagnostic altogether; __label__ is in the
> > implementation-reserved namespace.
>
> Hi Eli,
>
> I don't understand the reasoning here -- could you explain in more
> detail?  In my opinion, it makes sense to diagnose it.


The primary point of Extension diagnostics is primarily to produce
diagnostics which are required by the standard; they can also be useful so
people don't use non-standard features by accident.  Uses of identifiers in
the reserved namespace fall into neither of those categories, so we don't
want a diagnostic. There isn't any point to a diagnostic to warn about,
e.g. every use of __sync_val_compare_and_swap.

Also, _Complex
> is in the reserved namespace, too -- but you are not objecting to
> producing a diagnostic about it.
>

_Complex a keyword defined in the C99 standard; we have to produce a
diagnostic if you use it in ways not allowed by the standard (like
"_Complex int").

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130817/761b6f04/attachment.html>


More information about the cfe-commits mailing list