29 Mar 2012 16:36
Compiler warnings when building latest cygwin cvs with gcc-4.6 (0/2)
Ryan Johnson <ryan.johnson <at> cs.utoronto.ca>
2012-03-29 14:36:35 GMT
2012-03-29 14:36:35 GMT
Hi all While trying to build the cygwin dll from source, I accidentally left my home-built gcc-4.6 in PATH... and it complains loudly about all kinds of things, some of which might actually be of interest. I'll follow up shortly with two patches that fix those problems in a backwards compatible way, in case this provides a improvement in code quality (and future-proofing for when we upgrade cygwin's gcc4). The patched code compiles cleanly under both cygwin's gcc4 and my gcc-4.6.2, but the latter produces a broken cygwin1.dll. I haven't tried to figure out what goes wrong, since I don't know what changes went into cygwin's gcc4 to make it work properly in the first place. It could be something as simple as PATH/LD_LIBRARY_PATH... Patch 1: fix function attribute conflicts Patch 2: fix compiler misc. warnings NOTE: the warnings patch applies safely, but with fuzz, if the attributes patch has already been applied. If you're paranoid, apply the warnings patch first. Overview of changes: 1a. Conflicting function definition errors, due to functions declared with __attribute__((regparm(...))) and later defined without it. AFAIK, if both declaration and definition exist for a function, the definition must either give no attributes or all must match the declaration. This includes the __stdcall attribute...(Continue reading)
RSS Feed