This is the mail archive of the 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: Converting GCC to compilation with C++

On Tue, 13 Jul 2004, rd flowers wrote:

> But, we have extensions. We could have more (off by default) -- really
> intended for compiling GCC. Just add, incrementally and conservatively,
> an extension or 3 that help us do those things that motivated this whole
> thread.

We don't generally like adding extensions now.  They all impose a
maintenance burden in that changes to the compiler need not just to
consider all relevant standard language features but interactions of
extensions with those and with each other.  Extensions that add expressive
power useful for real programs (such as GCC) can be added but only with
very careful consideration.  The language design issues of such extensions
also need to be considered - whereas when you use an existing language
such as C++ the language design has already been done for you with due
consideration of how all the language features interact.

Existing extensions that the compiler uses conditionally (while still
supporting building with ISO C compilers) include:

* Atttributes on labels, not a particularly syntactically well-thought-out
feature, added to avoid warnings in generated code.  Not implemented for
C++ because it conflicts with labels on declarations.

* Format checking for GCC-specific formats.  In principle a general
extensible format checking system would be better, but is hard to design
in a way that doesn't tie us to keeping supporting particular internal
datastructures, so we hardwire checking for GCC's formats.

* C99 designated initializers (as an extension included in gnu89), also
not fully supported for C++ though with no intrinsic problem in so
supporting them.

Joseph S. Myers      (personal mail) (Bugzilla assignments and CCs)

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