[cfe-dev] Three code snippets accepted by clang and rejected by g++

Richard Smith richard at metafoo.co.uk
Tue Aug 12 19:33:41 PDT 2014


On Tue, Aug 12, 2014 at 3:07 AM, Renato Golin <renato.golin at linaro.org>
wrote:

> On 11 August 2014 22:49, Richard Smith <richard at metafoo.co.uk> wrote:
> > Clang's behavior reflects the current intent of the C++ core working
> group.
> > This is core issue 1699, and the current resolution to that is to treat
> > everything that is lexically within a befriended entity as being
> befriended.
> > GCC does not yet implement the resolution to core issue 1699 (which is
> > reasonable, since it's not yet even resolved).
>
> Shouldn't Clang only implement core issues with a special "bleeding edge"
> flag?


No, I don't think so -- or at least, not as a general policy. These are bug
fixes in the language, and it's not reasonable to expect us to maintain two
different codepaths with and without the fix. In this particular case,
Clang has (to my knowledge) never implemented anything other than the fixed
version, long before the committee chose to make the fix.

There are a handful of core issues for which we do maintain old and new
versions, controlled by the -std= flag, but those are weird and probably
not a good idea. Likewise, there are some cases where we maintain two
versions for compatibility with other compilers (notably, there are some of
these under -fms-compatibility).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140812/cb499d0b/attachment.html>


More information about the cfe-dev mailing list