http://sourceware.org/bugzilla/show_bug.cgi?id=14072
Bug #: 14072 Summary: Incorrect handling of config.h and/or sysdep.h causing problems Product: binutils Version: 2.23 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassig...@sourceware.org ReportedBy: sk...@iskunk.org Classification: Unclassified Created attachment 6397 --> http://sourceware.org/bugzilla/attachment.cgi?id=6397 Draft implementation of config.h include-guard This bug is a generalization of bug 13558. When compiling a source file in binutils, config.h needs to be #included before any system header file. The configuration header may contain feature test-macro definitions, and if those are not in place before a system header is pulled in, bugs like 13558 tend to happen. Numerous files in the binutils CVS source fail to do this correctly, however: * Sometimes, bfd.h (or the like) is included before sysdep.h, when sysdep.h is responsible for #including config.h * Sometimes, neither sysdep.h nor config.h is #included at all * Sometimes, config.h is #included twice, leading to re-definition warnings These issues are not always fatal, but when they are, they tend to occur on less-popular platforms that are not used in primary development (e.g. AIX in the case of bug 13558). I would like to propose a mechanism, draft-implemented in the attached patch against CVS, that enforces correct inclusion of the config header. The patch is self-explanatory, as should be the issues it exposes when binutils CVS is built. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils