[sclug] GCC extensions

Dickon Hood sclug at splurge.fluff.org
Thu Oct 27 12:30:35 UTC 2005


On Thu, Oct 27, 2005 at 12:44:29 +0100, Alex Butcher wrote:
: Useful reference:

: <http://rlove.org/log/2005102601>

: Robert also suggests using a header file which defines away the extensions
: if the compiler isn't GCC, or is too old to provide the extensions, thereby
: making code which uses them (more) portable.

Having just had to deal with some code which uses a bunch of GCC
extensions, using a non-GCC compiler (Sun's Forte compilers generate much
better code, so we use them in production), I must strongly say:

DO NOT USE GCC EXTENSIONS IN CODE, *ESPECIALLY* IF YOU'RE SURE YOU'LL
NEVER NEED TO COMPILE IT ON ANY OTHER PLATFORM USING ANY OTHER COMPILER.
Because you'll be wrong.

That is all.

-- 
Dickon Hood

Due to digital rights management, my .sig is temporarily unavailable.
Normal service will be resumed as soon as possible.  We apologise for the
inconvenience in the meantime.

No virus was found in this outgoing message as I didn't bother looking.


More information about the Sclug mailing list