preprocessor/10865: gcc -pthread does not add -D_REENTRANT

francois-xavier.kowalski@hp.com francois-xavier.kowalski@hp.com
Mon May 19 16:36:00 GMT 2003


>Number:         10865
>Category:       preprocessor
>Synopsis:       gcc -pthread does not add -D_REENTRANT
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 19 15:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     francois-xavier.kowalski@hp.com
>Release:        gcc-3.x
>Organization:
>Environment:
Linux ia64
>Description:
when invoked with option -pthread, gcc-3.x does not add the pre-processor definition -D_REENTRANT, as explained in the documentation & as gcc-2.x was previously doing.

This behaviour is duplicated on the old gcc-3.0.4 on RedHat 7.2 / ia64, then on the same compiler on RedHat Advanced Server 2.1, then on gcc-3.2.3 for Debian Sarge / ia64.

Ref: <http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=84589>

RedHat did not take this bug into account.
>How-To-Repeat:
Steps to Reproduce:
1. get the attached program pthbug.c
2. compile it with gcc -v -pthread -Wall -Wstrict-prototypes pthbug.c
3. note that -D_REENTRANT is not defined

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="pthbug.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="pthbug.c"

I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8cHRocmVhZC5oPgoKdm9pZCogcnVuKCB2b2lk
KiApOwoKaW50IG1haW4oIGludCBhcmdjLCBjaGFyICphcmd2W10gKQp7CiNpZm5kZWYgX1JFRU5U
UkFOVAojZXJyb3IgIl9SRUVOVFJBTlQgdW5kZWZpbmVkIgojZW5kaWYKCXB0aHJlYWRfdCBjaGls
ZDsKCXB0aHJlYWRfY3JlYXRlKCAmY2hpbGQsIE5VTEwsIHJ1biwgTlVMTCApOwoJZXhpdCggMCAp
Owp9Cgp2b2lkKiBydW4oIHZvaWQqIHAgKQp7CglwdGhyZWFkX2V4aXQoIE5VTEwgKTsKfQo=



More information about the Gcc-bugs mailing list