public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ktietz at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/40376] GCC defines UNICODE instead of _UNICODE for -municode
Date: Tue, 09 Jun 2009 06:52:00 -0000 [thread overview]
Message-ID: <20090609065227.6869.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40376-14772@http.gcc.gnu.org/bugzilla/>
------- Comment #5 from ktietz at gcc dot gnu dot org 2009-06-09 06:52 -------
(In reply to comment #4)
> Subject: Re: GCC defines UNICODE instead of _UNICODE
> for -municode
>
> UNICODE is in the user's namespace; it should not be predefined if
> flag_iso (if you have to use specs rather than hooks, you need
> %{!ansi:%{!std=i*:%{!std=c*:-DUNICODE}}} to detect the various conformance
> options). We should not add to the instances of bug 545 that are still
> present. If the MinGW headers use a macro in the user's namespace as a
> feature test macro of some sort, they are buggy and should be fixed (with
> fixincludes if necessary for existing installations).
>
It is right that _UNICODE and UNICODE are in user name space defined and are
controlling which API (wide/or ascii) has to be used.
UNICODE is used in windows headers itself (see msdn for documentation).
_UNICODE is used in CRT (and inspecial in tchar.h header) only. (This is also
documented in msdn).
I agree, that these two different macro names are a bit annoying, but for sure
they are platform specific stuff and are for sure absolutely unrelated to ISO.
Therefore to introduce a relationship to ISO defines is contradictive and
wrong. Those macros are controling behaviour of runtime. By the windows
specific switch -municode the windows runtime is controlled.
Cheers,
Kai
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40376
prev parent reply other threads:[~2009-06-09 6:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 4:27 [Bug preprocessor/40376] New: " nightstrike at gmail dot com
2009-06-08 7:51 ` [Bug preprocessor/40376] " ktietz at gcc dot gnu dot org
2009-06-08 8:31 ` ktietz at gcc dot gnu dot org
2009-06-08 9:09 ` ktietz at gcc dot gnu dot org
2009-06-08 9:40 ` joseph at codesourcery dot com
2009-06-09 6:52 ` ktietz at gcc dot gnu dot org [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090609065227.6869.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).