This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Fixincludes cleanup (openbsd)


Nathanael Nerode wrote:
> 
> OpenBSD's current math.h doesn't need this fix, but would hit it (if
> OpenBSD were using standard fixincludes).  (Old OpenBSD does need it.)
> 
> Is there a problem with my proposed change?  Can I embed newlines in the
> bypass clause?  Can there be two bypass clauses?  (The current clause
> appears to be GLIBC-specific, bizarrely.)

This would not be the only test with multiple bypass clauses.
They are accommodated.  To trigger, every select clause must
be successful and no bypass clauses may be successful.  And the
answer to your question about embedded newlines is "yes."  These
clauses are handed off to regcomp(3) and regexec(3), so whatever
they accept can be used here.

> Would it just be better to replace both clauses with
> bypass = "__cplusplus" under the assumption that a C++-aware header has
> done the right thing?

Yes.

>  Or should we worry about the possibility that
> there exists, somewhere, a C++-aware header which doesn't do the right
> thing (which would be very odd and broken).

I've never seen C++ aware files not do the right thing.
So, if the header that contains ``We have a problem when using C++''
also contains ``__cplusplus'', then I'd certainly recommend just
that test.


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