[cfe-dev] Three code snippets accepted by clang and rejected by g++
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>
> 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
> > This is core issue 1699, and the current resolution to that is to treat
> > everything that is lexically within a befriended entity as being
> > 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"
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...
More information about the cfe-dev