[PATCH]: "decorate" gcc extensions with __extension__

Nicholas Wourms nwourms@gawab.com
Sun Mar 27 06:58:00 GMT 2005


Hi All,

This patch is the first of many patches as part of my attempt to
clean up warnings/errors triggered when building with "-W -Wall
pedantic" flags.  In this patch, I have "decorated" all
occurances of gcc c/c++ extensions with the the __extension__
label.  It is necessary to do this since pedantic causes most
all ISO/ANSI compliance warnings to be treated as errors. 
Despite the fact that they are gcc extensions, I think the use
of zero & variable length arrays really ought to be discouraged.
 IMHO, the variable length arrays should be converted to use
alloca.  As for the zero-length arrays which are being used for
padding structs, wouldn't using the appropriate pragma be a
better idea?  But I guess that's just my $0.02 on the subject,
so feel free to disagree.  Anyways, A patch is attached which
will do for now.  Also some of the other extensions I've labeled
include braced-group macros, arrays with designated
initializers, and anonymous structs.

Cheers,
Nicholas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog.txt
Type: application/octet-stream
Size: 3218 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20050327/cb385ff0/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin-gcc-extension-decorations.patch
Type: application/octet-stream
Size: 22705 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20050327/cb385ff0/attachment-0001.obj>


More information about the Cygwin-patches mailing list