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]

c/683: wrong behaviour of (?:) with wchar_t



>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=

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