eli.friedman at gmail.com
Mon Oct 6 14:50:31 PDT 2008
On Mon, Oct 6, 2008 at 10:49 AM, Chris Lattner <clattner at apple.com> wrote:
> FWIW, I also agree here: In terms of core C++ support (name
> resolution, templates, etc), clang should aim to be as conformant as
> possible. Accepting broken code is more more important for C than C+
> +. That said, I think it will be important for the C++ front-end to
> accept some of the grossness that comes from the common subset of C
> and C++ (e.g. "extended" integer constant expressions, etc), and we'll
> probably end up supporting the GNU C++ extensions as well someday.
I think the philosophy should be exactly the same as that for C: we
try to be as standards-compliant as possible, try to allow
non-standard constructs in such a way that compliant code doesn't
break, and deal with any conflicts on a case-by-case basis. Conflicts
are generally rare... the only ones I can think of that we've had to
deal with for C are trigraph support and integer constant expressions
like those in tgmath.h.
> For better or worse, C++ programmers are much more used to having to
> tweak their code when updating compilers than C programmers, and there
> are many more 'dusty decks' of C programs out there.
g++ can get away with breaking code because of its market-share; I
don't think that's really relevant for clang. I'm sure we'll run into
plenty of places where we'll have to extend the semantics for
More information about the cfe-dev