[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proposal: Making Debian compiler agnostic

On 28/08/2012 18:27, Ben Hutchings wrote:
On Tue, 2012-08-28 at 17:18 +0200, Sylvestre Ledru wrote:

This summer, during the Google Summer of Code (GSoC), we have been
working to provide a way to rebuild the archive with a non-gcc compiler
(in our case: clang).

Our project's intent is not to change the default compiler, just use a
secondary compiler to generate more errors or warnings for package
maintainers to be aware of. In most cases, keeping both compilers happy
would result in higher quality code, something I think we can all get
We should also make the following assumption -- the CC / CXX compiler
will accept gcc compatible arguments, with only very minor changes that
are gcc compatible as well (such as using -O3 rather then the
meaningless -O6, etc). The clang compiler, for example, considers
incompatible arguments with gcc a bug.

Are all alternate compilers expected to implement gcc extensions?  Must
the code be changed to use appropriate '#ifdef __GNUC__' guards?  (And
what happens the next time gcc adds a new extension...?)
With clang, most of them are implemented.
However, some of them are not. For example, nested functions:
or some "Variable-length arrays" declarations:

Most of the time, they are not implemented on purpose (one of the goal of clang is to be a replacement of gcc).
For more information:

About Intel compilers or path64, I don't know how far they go.

I just would like to remind that our proposal is not about gcc vs clang but more about decouple Debian and gcc.


Reply to: