* [patch i386 mingw g++.dg gcc.dg]: Set -mms-bitfields as default for native windows targets
@ 2011-04-12 12:47 Kai Tietz
2011-04-12 17:47 ` Richard Henderson
0 siblings, 1 reply; 7+ messages in thread
From: Kai Tietz @ 2011-04-12 12:47 UTC (permalink / raw)
To: GCC Patches; +Cc: Richard Henderson
[-- Attachment #1: Type: text/plain, Size: 738 bytes --]
Hello,
This patch enables by default for native Windows targets the
-mms-bitfields option, like the netware target does.
ChangeLog gcc/
* config/i386/mingw32.h (TARGET_SUBTARGET_DEFAULT): Add
MASK_MS_BITFIELD_LAYOUT bit.
ChangeLog gcc/testsuite
* g++.dg/ext/bitfield2.C: Add for i?86/x86_64-*-mingw*
targets the additional -mno-ms-bitfields and
-Wno-packed-bitfield-compat options.
* g++.dg/ext/bitfield3.C: Likewise.
* g++.dg/ext/bitfield4.C: Likewise.
* g++.dg/ext/bitfield5.C: Likewise.
* gcc.dg/bitfld-15.c: Likewise.
* gcc.dg/bitfld-16.c: Likewise.
* gcc.dg/bitfld-17.c: Likewise.
* gcc.dg/bitfld-18.c: Likewise.
Tested for i686-w64-mingw32, x86_64-w64-mingw32, and
x86_&4-pc-linux-gnu. Ok for apply?
Regards,
Kai
[-- Attachment #2: wt_msbitfield.txt --]
[-- Type: text/plain, Size: 5968 bytes --]
Index: gcc/gcc/config/i386/mingw32.h
===================================================================
--- gcc.orig/gcc/config/i386/mingw32.h 2011-04-12 12:07:34.000000000 +0200
+++ gcc/gcc/config/i386/mingw32.h 2011-04-12 12:13:05.891324300 +0200
@@ -22,6 +22,17 @@ along with GCC; see the file COPYING3.
#undef DEFAULT_ABI
#define DEFAULT_ABI MS_ABI
+/* By default, target has a 80387, uses IEEE compatible arithmetic,
+ returns float values in the 387 and needs stack probes.
+ We also align doubles to 64-bits for MSVC default compatibility.
+ Additionally we enable MS_BITFIELD_LAYOUT by default. */
+
+#undef TARGET_SUBTARGET_DEFAULT
+#define TARGET_SUBTARGET_DEFAULT \
+ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS \
+ | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
+ | MASK_MS_BITFIELD_LAYOUT)
+
/* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
is for compatibility with native compiler. */
#define EXTRA_OS_CPP_BUILTINS() \
Index: gcc/gcc/testsuite/g++.dg/ext/bitfield2.C
===================================================================
--- gcc.orig/gcc/testsuite/g++.dg/ext/bitfield2.C 2010-11-11 18:00:57.000000000 +0100
+++ gcc/gcc/testsuite/g++.dg/ext/bitfield2.C 2011-04-12 14:32:33.112826500 +0200
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* Remove pedantic. Allow the GCC extension to use char for bitfields. */
/* { dg-options "" } */
-/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target { i?86-*-netware i?86-*-mingw* x86_64-*-mingw* } } } */
struct t /* { dg-message "note: offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
{
Index: gcc/gcc/testsuite/g++.dg/ext/bitfield3.C
===================================================================
--- gcc.orig/gcc/testsuite/g++.dg/ext/bitfield3.C 2010-09-09 16:04:53.000000000 +0200
+++ gcc/gcc/testsuite/g++.dg/ext/bitfield3.C 2011-04-12 12:29:11.612455300 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Wno-packed-bitfield-compat" } */
-/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target { i?86-*-netware i?86-*-mingw* x86_64-*-mingw* } } } */
struct t
{
Index: gcc/gcc/testsuite/g++.dg/ext/bitfield4.C
===================================================================
--- gcc.orig/gcc/testsuite/g++.dg/ext/bitfield4.C 2010-11-11 18:00:57.000000000 +0100
+++ gcc/gcc/testsuite/g++.dg/ext/bitfield4.C 2011-04-12 14:33:10.989636200 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "" } */
-/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target { i?86-*-netware i?86-*-mingw* x86_64-*-mingw* } } } */
struct t /* { dg-message "note: offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
{
Index: gcc/gcc/testsuite/g++.dg/ext/bitfield5.C
===================================================================
--- gcc.orig/gcc/testsuite/g++.dg/ext/bitfield5.C 2010-09-09 16:04:52.000000000 +0200
+++ gcc/gcc/testsuite/g++.dg/ext/bitfield5.C 2011-04-12 14:33:35.115199800 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Wno-packed-bitfield-compat" } */
-/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target { i?86-*-netware i?86-*-mingw* x86_64-*-mingw* } } } */
struct t
{
Index: gcc/gcc/testsuite/gcc.dg/bitfld-15.c
===================================================================
--- gcc.orig/gcc/testsuite/gcc.dg/bitfld-15.c 2010-11-11 18:00:57.000000000 +0100
+++ gcc/gcc/testsuite/gcc.dg/bitfld-15.c 2011-04-12 14:23:33.380789200 +0200
@@ -2,6 +2,7 @@
/* Remove pedantic. Allow the GCC extension to use char for bitfields. */
/* { dg-options "" } */
/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
+/* { dg-options "-mno-ms-bitfields -Wno-packed-bitfield-compat" { target { i?86-*-mingw* x86_64-*-mingw* } } } */
struct t
{
Index: gcc/gcc/testsuite/gcc.dg/bitfld-16.c
===================================================================
--- gcc.orig/gcc/testsuite/gcc.dg/bitfld-16.c 2010-09-09 16:02:35.000000000 +0200
+++ gcc/gcc/testsuite/gcc.dg/bitfld-16.c 2011-04-12 12:22:00.129163900 +0200
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-Wno-packed-bitfield-compat" } */
/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target { i?86-*-mingw* x86_64-*-mingw* } } } */
struct t
{
Index: gcc/gcc/testsuite/gcc.dg/bitfld-17.c
===================================================================
--- gcc.orig/gcc/testsuite/gcc.dg/bitfld-17.c 2010-11-11 18:00:57.000000000 +0100
+++ gcc/gcc/testsuite/gcc.dg/bitfld-17.c 2011-04-12 14:29:02.181541600 +0200
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "" } */
/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
+/* { dg-options "-mno-ms-bitfields -Wno-packed-bitfield-compat" { target { i?86-*-mingw* x86_64-*-mingw* } } } */
struct t
{
Index: gcc/gcc/testsuite/gcc.dg/bitfld-18.c
===================================================================
--- gcc.orig/gcc/testsuite/gcc.dg/bitfld-18.c 2010-09-09 16:02:30.000000000 +0200
+++ gcc/gcc/testsuite/gcc.dg/bitfld-18.c 2011-04-12 14:24:04.904792200 +0200
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-Wno-packed-bitfield-compat" } */
/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target { i?86-*-mingw* x86_64-*-mingw* } } } */
struct t
{
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch i386 mingw g++.dg gcc.dg]: Set -mms-bitfields as default for native windows targets
2011-04-12 12:47 [patch i386 mingw g++.dg gcc.dg]: Set -mms-bitfields as default for native windows targets Kai Tietz
@ 2011-04-12 17:47 ` Richard Henderson
2011-04-12 18:53 ` Kai Tietz
0 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2011-04-12 17:47 UTC (permalink / raw)
To: Kai Tietz; +Cc: GCC Patches
On 04/12/2011 05:47 AM, Kai Tietz wrote:
> ChangeLog gcc/
>
> * config/i386/mingw32.h (TARGET_SUBTARGET_DEFAULT): Add
> MASK_MS_BITFIELD_LAYOUT bit.
>
> ChangeLog gcc/testsuite
>
> * g++.dg/ext/bitfield2.C: Add for i?86/x86_64-*-mingw*
> targets the additional -mno-ms-bitfields and
> -Wno-packed-bitfield-compat options.
> * g++.dg/ext/bitfield3.C: Likewise.
> * g++.dg/ext/bitfield4.C: Likewise.
> * g++.dg/ext/bitfield5.C: Likewise.
> * gcc.dg/bitfld-15.c: Likewise.
> * gcc.dg/bitfld-16.c: Likewise.
> * gcc.dg/bitfld-17.c: Likewise.
> * gcc.dg/bitfld-18.c: Likewise.
Ok.
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch i386 mingw g++.dg gcc.dg]: Set -mms-bitfields as default for native windows targets
2011-04-12 17:47 ` Richard Henderson
@ 2011-04-12 18:53 ` Kai Tietz
2011-04-13 10:37 ` Pedro Alves
0 siblings, 1 reply; 7+ messages in thread
From: Kai Tietz @ 2011-04-12 18:53 UTC (permalink / raw)
To: Richard Henderson; +Cc: GCC Patches
2011/4/12 Richard Henderson <rth@redhat.com>:
> On 04/12/2011 05:47 AM, Kai Tietz wrote:
>> ChangeLog gcc/
>>
>> * config/i386/mingw32.h (TARGET_SUBTARGET_DEFAULT): Add
>> MASK_MS_BITFIELD_LAYOUT bit.
>>
>> ChangeLog gcc/testsuite
>>
>> * g++.dg/ext/bitfield2.C: Add for i?86/x86_64-*-mingw*
>> targets the additional -mno-ms-bitfields and
>> -Wno-packed-bitfield-compat options.
>> * g++.dg/ext/bitfield3.C: Likewise.
>> * g++.dg/ext/bitfield4.C: Likewise.
>> * g++.dg/ext/bitfield5.C: Likewise.
>> * gcc.dg/bitfld-15.c: Likewise.
>> * gcc.dg/bitfld-16.c: Likewise.
>> * gcc.dg/bitfld-17.c: Likewise.
>> * gcc.dg/bitfld-18.c: Likewise.
>
> Ok.
>
>
> r~
>
Applied at revision 172336.
Thanks,
Kai
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch i386 mingw g++.dg gcc.dg]: Set -mms-bitfields as default for native windows targets
2011-04-12 18:53 ` Kai Tietz
@ 2011-04-13 10:37 ` Pedro Alves
2011-04-13 10:43 ` Kai Tietz
0 siblings, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2011-04-13 10:37 UTC (permalink / raw)
To: gcc-patches; +Cc: Kai Tietz, Richard Henderson
On Tuesday 12 April 2011 19:53:42, Kai Tietz wrote:
> 2011/4/12 Richard Henderson <rth@redhat.com>:
> > On 04/12/2011 05:47 AM, Kai Tietz wrote:
> >> ChangeLog gcc/
> >>
> >> * config/i386/mingw32.h (TARGET_SUBTARGET_DEFAULT): Add
> >> MASK_MS_BITFIELD_LAYOUT bit.
> >>
> >> ChangeLog gcc/testsuite
> >>
> >> * g++.dg/ext/bitfield2.C: Add for i?86/x86_64-*-mingw*
> >> targets the additional -mno-ms-bitfields and
> >> -Wno-packed-bitfield-compat options.
> >> * g++.dg/ext/bitfield3.C: Likewise.
> >> * g++.dg/ext/bitfield4.C: Likewise.
> >> * g++.dg/ext/bitfield5.C: Likewise.
> >> * gcc.dg/bitfld-15.c: Likewise.
> >> * gcc.dg/bitfld-16.c: Likewise.
> >> * gcc.dg/bitfld-17.c: Likewise.
> >> * gcc.dg/bitfld-18.c: Likewise.
> >
> > Ok.
> >
> >
> > r~
> >
>
>
> Applied at revision 172336.
>
> Thanks,
> Kai
>
This is a default ABI change (IIRC, when the option was
introduced, it was left off as default so to not break the ABI).
Shouldn't we advertise it somewhere?
--
Pedro Alves
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch i386 mingw g++.dg gcc.dg]: Set -mms-bitfields as default for native windows targets
2011-04-13 10:37 ` Pedro Alves
@ 2011-04-13 10:43 ` Kai Tietz
2011-04-13 10:49 ` Pedro Alves
0 siblings, 1 reply; 7+ messages in thread
From: Kai Tietz @ 2011-04-13 10:43 UTC (permalink / raw)
To: Pedro Alves; +Cc: gcc-patches, Richard Henderson
2011/4/13 Pedro Alves <pedro@codesourcery.com>:
> On Tuesday 12 April 2011 19:53:42, Kai Tietz wrote:
>> 2011/4/12 Richard Henderson <rth@redhat.com>:
>> > On 04/12/2011 05:47 AM, Kai Tietz wrote:
>> >> ChangeLog gcc/
>> >>
>> >> * config/i386/mingw32.h (TARGET_SUBTARGET_DEFAULT): Add
>> >> MASK_MS_BITFIELD_LAYOUT bit.
>> >>
>> >> ChangeLog gcc/testsuite
>> >>
>> >> * g++.dg/ext/bitfield2.C: Add for i?86/x86_64-*-mingw*
>> >> targets the additional -mno-ms-bitfields and
>> >> -Wno-packed-bitfield-compat options.
>> >> * g++.dg/ext/bitfield3.C: Likewise.
>> >> * g++.dg/ext/bitfield4.C: Likewise.
>> >> * g++.dg/ext/bitfield5.C: Likewise.
>> >> * gcc.dg/bitfld-15.c: Likewise.
>> >> * gcc.dg/bitfld-16.c: Likewise.
>> >> * gcc.dg/bitfld-17.c: Likewise.
>> >> * gcc.dg/bitfld-18.c: Likewise.
>> >
>> > Ok.
>> >
>> >
>> > r~
>> >
>>
>>
>> Applied at revision 172336.
>>
>> Thanks,
>> Kai
>>
>
> This is a default ABI change (IIRC, when the option was
> introduced, it was left off as default so to not break the ABI).
>
> Shouldn't we advertise it somewhere?
>
> --
> Pedro Alves
>
Yes, I did recently a lot of abi changing for mingw's targets. They
all will need a nice description (and possible ways to get old default
behavior) in changes.html
I collect them for later. Or do you mean it should be noted earlier?
Regards,
Kai
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch i386 mingw g++.dg gcc.dg]: Set -mms-bitfields as default for native windows targets
2011-04-13 10:43 ` Kai Tietz
@ 2011-04-13 10:49 ` Pedro Alves
2011-11-08 19:19 ` Dave Korn
0 siblings, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2011-04-13 10:49 UTC (permalink / raw)
To: gcc-patches; +Cc: Kai Tietz, Richard Henderson
On Wednesday 13 April 2011 11:43:43, Kai Tietz wrote:
> > This is a default ABI change (IIRC, when the option was
> > introduced, it was left off as default so to not break the ABI).
> >
> > Shouldn't we advertise it somewhere?
> Yes, I did recently a lot of abi changing for mingw's targets. They
> all will need a nice description (and possible ways to get old default
> behavior) in changes.html
>
> I collect them for later. Or do you mean it should be noted earlier?
As long as it's mentioned somewhere before a release, that's fine
with me.
(Though mentioning changes as you do them has better chances of
something not getting forgotten, or in case you end up
unavailable. Hope not! :-) )
--
Pedro Alves
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch i386 mingw g++.dg gcc.dg]: Set -mms-bitfields as default for native windows targets
2011-04-13 10:49 ` Pedro Alves
@ 2011-11-08 19:19 ` Dave Korn
0 siblings, 0 replies; 7+ messages in thread
From: Dave Korn @ 2011-11-08 19:19 UTC (permalink / raw)
To: Pedro Alves; +Cc: gcc-patches, Kai Tietz, Richard Henderson
On 13/04/2011 11:49, Pedro Alves wrote:
> On Wednesday 13 April 2011 11:43:43, Kai Tietz wrote:
>>> This is a default ABI change (IIRC, when the option was
>>> introduced, it was left off as default so to not break the ABI).
>>>
>>> Shouldn't we advertise it somewhere?
>
>> Yes, I did recently a lot of abi changing for mingw's targets. They
>> all will need a nice description (and possible ways to get old default
>> behavior) in changes.html
>>
>> I collect them for later. Or do you mean it should be noted earlier?
>
> As long as it's mentioned somewhere before a release, that's fine
> with me.
>
> (Though mentioning changes as you do them has better chances of
> something not getting forgotten, or in case you end up
> unavailable. Hope not! :-) )
Now we're coming up for a release.... did this happen?
cheers,
DaveK
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-08 18:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-12 12:47 [patch i386 mingw g++.dg gcc.dg]: Set -mms-bitfields as default for native windows targets Kai Tietz
2011-04-12 17:47 ` Richard Henderson
2011-04-12 18:53 ` Kai Tietz
2011-04-13 10:37 ` Pedro Alves
2011-04-13 10:43 ` Kai Tietz
2011-04-13 10:49 ` Pedro Alves
2011-11-08 19:19 ` Dave Korn
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).