[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/14072] New: Incorrect handling of config.h and/or sysdep.h
From: |
skunk at iskunk dot org |
Subject: |
[Bug binutils/14072] New: Incorrect handling of config.h and/or sysdep.h causing problems |
Date: |
Mon, 07 May 2012 17:08:59 +0000 |
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: address@hidden
ReportedBy: address@hidden
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/14072] New: Incorrect handling of config.h and/or sysdep.h causing problems,
skunk at iskunk dot org <=
- [Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems, nickc at redhat dot com, 2012/05/16
- [Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems, skunk at iskunk dot org, 2012/05/16
- [Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems, cvs-commit at gcc dot gnu.org, 2012/05/17
- [Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems, nickc at redhat dot com, 2012/05/17
- [Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems, hp at sourceware dot org, 2012/05/17
- [Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems, hp at sourceware dot org, 2012/05/17
- [Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems, skunk at iskunk dot org, 2012/05/17
- [Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems, cvs-commit at gcc dot gnu.org, 2012/05/18
- [Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems, skunk at iskunk dot org, 2012/05/19