This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/14520] New: fixincludes mishandles comment containing #include in stdlib.h
- From: "jifl-bugzilla at jifvik dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Mar 2004 05:08:53 -0000
- Subject: [Bug bootstrap/14520] New: fixincludes mishandles comment containing #include in stdlib.h
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I have installed system headers for an embedded system in $PREFIX/sys-includes.
As per some local coding standards, they include a proforma that includes this
at the top of the header:
// Usage: #include <stdlib.h>
However fixincludes "fixes" the header to replace this with:
// Usage:#ifdef BOGUS_RECURSION
#include <stdlib.h>
#endif
Clearly this fix itself is bogus and causes a bogus recursion where previously
there was none!
The offending "fix" in fixinc/inclhack.def was removed from GCC mainline in
January 2003. See the change at line 1805 here:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/inclhack.def.diff?r1=1.139&r2=1.140&f=h
I will be using the gcc 3.x branch with some (yet to be announced but eventually
public) improvements to eCos <http://ecos.sourceware.org/>, and I would prefer
to avoid any unnecessary patches, so I would appreciate if this change could
also be back-applied to the 3.3 branch in time for 3.3.4.
If it isn't acceptable to obsolete this "fix" (even though it is clearly
obsolete), it can be corrected by anchoring to the start of line like so:
select = "^[ \t]*#include <stdlib\\.h>.*";
I note that many other fixinc fixes use regexps for #includes that also don't
anchor to the start of line. Perhaps they should?
--
Summary: fixincludes mishandles comment containing #include in
stdlib.h
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jifl-bugzilla at jifvik dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnulibc2.2
GCC host triplet: i686-pc-linux-gnulibc2.2
GCC target triplet: arm-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14520