This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/683: wrong behaviour of (?:) with wchar_t
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/683: wrong behaviour of (?:) with wchar_t
- From: wilhelm dot nuesser at sap dot com
- Date: 24 Oct 2000 14:50:32 -0000
- Reply-To: wilhelm dot nuesser at sap dot com
- Resent-Cc: gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, wilhelm.nuesser@sap.com
>Number: 683
>Category: c
>Synopsis: wrong behaviour of (?:) with wchar_t
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 24 07:56:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: sap
>Release: unknown-1.0
>Organization:
>Environment:
Linux (kernel 2.2.*) RedHat 6.1, 6.2
gcc: Standard 2.95.2 (and egcs 1.1.2)
>Description:
When executing code like
wchar_t w1, w2;
x=0;
func (x ? w1: w2);
the result is always w1.
>How-To-Repeat:
simply compile the attached file with gcc and run it.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="wtest.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="wtest.c"
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDx3Y2hhci5oPgoKdm9pZCBQcmludFdjaGFyU3Ry
aW5nKCB3Y2hhcl90KiBzICkKewoJaW50IGk7Cglmb3IoIGk9MDsgc1tpXSE9MDsgaSsrICkKCXsK
CQlwcmludGYoIiVjIiwoY2hhcilzW2ldKTsKCX0KCXByaW50ZigiXG4iKTsKCXJldHVybjsKfQoK
CmludCBtYWluKCkKewpzdGF0aWMgaW50IHggPSAwOwoJUHJpbnRXY2hhclN0cmluZyggeCA/IEwi
Uk8iIDogTCJSSSIgKTsKfQo=