[RFC] cygport: use -Werror=implicit-function-declarations

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Wed Oct 16 23:42:00 GMT 2013


One of the more common causes of SEGVs with x86_64-cygwin packages 
occurs when an implicit function declaration causes an assumption that 
all arguments and the return value are of type 'int' (32 bits) where 
some or all of these are longs or pointers (64 bits on x86_64).  One way 
of avoiding such errors is to add -Werror=implicit-function-declarations 
to the default CFLAGS/OBJCFLAGS, and in my brief testing to date, this 
has already caught a number of cases where this would have broken the 
package on x86_64.

One potential drawback is that this flag may cause false negatives in 
poorly written configure tests; without extensive testing, I can't say 
yet how prevalent this would be, but I think that making this an error 
and perusing config.log is generally easier than making it just a 
warning and having to sift through the entire output of make.

My proposed patch for cygport git master is attached.  Any thoughts? 
And are there any other warning flags which cause similar errors on 
x86_64 that should be added as well?


Yaakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygport-Werror-implicit-decls.patch
Type: text/x-patch
Size: 2165 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20131016/cdbbcc88/attachment.bin>


More information about the Cygwin-apps mailing list