This is the mail archive of the gcc-bugs@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]

[Bug libstdc++/11953] _REENTRANT defined when compiling non-threaded code.


------- Additional Comments From ro at techfak dot uni-bielefeld dot de  2004-05-18 18:40 -------
Subject: Re:  _REENTRANT defined when compiling non-threaded code.

ljrittle at gcc dot gnu dot org writes:

> Please do not reopen this bug unless you engage the original author of the patch
> that broke it (e.g. ro).  Users should not be writing code which depends on the
> state of _REENTRANT.

Exactly: I have yet to see some normative text stating that _REENTRANT must
not be defined without threading support enabled.  So far the assertions
have only been `we have always used it to determine if threading support is
available', but no indication whatsoever why this is necessary and why they
use _REENTRANT for that purpose.  Proper tests should test for the
respective functions instead, it seems.

> Like Benjamin I will only comment indirectly: I will just state that every other
> port which enabled threading support did not require this define to be
> (unconditionally) blasted into gthr-posix.h .  Every other port figured out how
> to stuff it in port-specific places. I don't know if Rainer should be asked to
> rework his thread support for alpha*-dec-osf[45]*... (but that would be my
> choice to properly close this bug even though I don't think portable code should
> even use this macro's state in any way)

I can try to stuff this definition into a (new) config/os/osf/os_defines.h,
but that means I'll have to duplicate config/os/generic/ctype_* to allow
this.

	Rainer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11953


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