This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ARI] Add "bzero"


>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Tom> For this specific case, and some others like it, perhaps using #pragma
Tom> poison would be better.  That would result in a compile time error,
Tom> rather than a report on a web page.

Joel> I really liked the idea and gave it a quick try, but I don't know
Joel> how to make it work. I thought I would put the pragma at the end of
Joel> defs.h, since defs.h is always included.  But defs.h is also always
Joel> the first file to be included, and so any #include that follows it
Joel> which references any of the poisoned identifier will cause an error.

Joel> Do you see another way?

Nope.  In gcc I think the possibly-offending system headers are all
included in a single header file ("system.h"), and then the poisoning
is done at the end of that file.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]