This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] include _mingw.h in stddef.h


2009/9/18 Ozkan Sezer <sezeroz@gmail.com>:
> On Thu, Sep 17, 2009 at 5:19 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
>> 2009/9/17 Dave Korn <dave.korn.cygwin@googlemail.com>:
>>> Ozkan Sezer wrote:
>>>
>>>> As Kai noted, builtin types would be problematic, cannot be
>>>> used in combination with signed and unsigned. ?That leaves
>>>> the other option of unconditionally pre-including _mingw.h.
>>>
>>> ?Not quite, it leaves the *two* options of pre-including _mingw.h, or of
>>> using some predefined preprocessor macros in the spec strings to mimic what
>>> _mingw.h does but in a completely built-in way.
>>>
>>> ?Which is exactly where we were about three exchanges of email ago, this
>>> thread is now looping, and since I've said what I have to say I won't carry on
>>> unless I have something new to say. ?I'm sure whatever solution you guys
>>> decide on will be just fine.
>>
>> Well, the most compatible way would be to use a predefined macro (eg.
>> #define __int128 int __attribute__ ((__mode__ (TI)))
>> #define __int64 int __attribute__ ((__mode__ (DI)))
>> ). But this doesn't work, as gcc complaints here "error: mode 'DI'
>> applied to inappropriate type". And this is right, because it is a
>> type attribute not usable out-side of typedef.
>>
>> To have always pre-included <_mingw.h> for win32 targets would be
>> fine, but all mingw C-runtime headers indirectly include it already.
>> So I think that a C-runtime requirement of all other headers of mingw
>> runtime, should fit also to the header provided by gcc here. stddef.h
>> is AFAIU a C-runtime header in first scope. E.g for Wine, it is pretty
>> necessary, that the windows headers define their include dependencies
>> by themself, as they are using here a linux compiler to build, which
>> for sure won't have this pre-include feature.
>>
>> Cheers,
>> Kai
>
> What is the mingw maintainers' final decision on this?

I vote for adding _mingw.h include for mingw targets. I think Danny
should have here a final word about this, too. If there are no
objections in the next 24 hours, this patch is ok from my side.

Cheers,
Kai


-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


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