public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/8901: __WCHAR_MAX__ not defined correctly for -fshort-wchar
@ 2002-12-11  9:53 neil
  0 siblings, 0 replies; 2+ messages in thread
From: neil @ 2002-12-11  9:53 UTC (permalink / raw)
  To: cheinan, gcc-bugs, gcc-prs, nobody

Synopsis: __WCHAR_MAX__ not defined correctly for -fshort-wchar

State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Wed Dec 11 09:53:51 2002
State-Changed-Why:
    Fixed yesterday, thanks.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8901


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c/8901: __WCHAR_MAX__ not defined correctly for -fshort-wchar
@ 2002-12-11  8:36 cheinan
  0 siblings, 0 replies; 2+ messages in thread
From: cheinan @ 2002-12-11  8:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8901
>Category:       c
>Synopsis:       __WCHAR_MAX__ not defined correctly for -fshort-wchar
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 11 08:36:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Cheinan Marks
>Release:        gcc version 3.3 20021209 (experimental)
>Organization:
>Environment:
Sun Sparc Solaris 8
>Description:
__WCHAR_MAX__ incorrectly defined when -fshort-wchar is used.  It set to 32767, but a wchar_t is a short unsigned int (see __WCHAR_TYPE__) and the correct value for an unsigned short is 65535.
>How-To-Repeat:
liza:~/test> cat empty.cpp
int main()
{
        return 0;
}

liza:~/test Yes Master? ~/gccsnap/gcctarget/bin/g++ -E -dM -fshort-wchar empty.cpp | grep -i wchar
#define __WCHAR_MAX__ 32767
#define __WCHAR_TYPE__ short unsigned int
#define __WCHAR_UNSIGNED__ 1
>Fix:
Workaround:  Add -D__WCHAR_MAX__=65535 to command line.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-11 17:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-11  9:53 c/8901: __WCHAR_MAX__ not defined correctly for -fshort-wchar neil
  -- strict thread matches above, loose matches on Subject: below --
2002-12-11  8:36 cheinan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).