@@ -406,7 +406,9 @@ Objective-C and Objective-C++ Dialects}.
406
406
-Wparentheses -Wno-pedantic-ms-format
407
407
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast
408
408
-Wno-pragmas -Wno-pragma-once-outside-header -Wno-prio-ctor-dtor
409
- -Wredundant-decls -Wrestrict -Wno-return-local-addr -Wreturn-type
409
+ -Wno-psabi
410
+ -Wredundant-decls -Wrestrict
411
+ -Wno-return-local-addr -Wreturn-type
410
412
-Wno-scalar-storage-order -Wsequence-point
411
413
-Wshadow -Wshadow=global -Wshadow=local -Wshadow=compatible-local
412
414
-Wno-shadow-ivar
@@ -6497,7 +6499,8 @@ of a derived class.
6497
6499
6498
6500
Warn about code affected by ABI changes. This includes code that may
6499
6501
not be compatible with the vendor-neutral C++ ABI as well as the psABI
6500
- for the particular target.
6502
+ for the particular target. The latter warnings are also controlled
6503
+ separately by @option{-Wpsabi}, which is implied by @option{-Wabi}.
6501
6504
6502
6505
Since G++ now defaults to updating the ABI with each major release,
6503
6506
normally @option{-Wabi} warns only about C++ ABI compatibility
@@ -6600,27 +6603,21 @@ This was fixed in @option{-fabi-version=10}, the default for GCC 6.1.
6600
6603
6601
6604
@end itemize
6602
6605
6603
- This option also enables warnings about psABI-related changes.
6604
- The known psABI changes at this point include:
6606
+ @opindex Wpsabi
6607
+ @opindex Wno-psabi
6608
+ @item -Wpsabi @r{(C, Objective-C, C++ and Objective-C++ only)}
6605
6609
6606
- @itemize @bullet
6607
-
6608
- @item
6609
- For SysV/x86-64, unions with @code{long double} members are
6610
- passed in memory as specified in psABI. Prior to GCC 4.4, this was not
6611
- the case. For example:
6610
+ @option{-Wpsabi} enables warnings about processor-specific ABI
6611
+ changes, such as changes in alignment requirements or how function
6612
+ arguments are passed. On several targets, including AArch64, ARM,
6613
+ x86, MIPS, RS6000/PowerPC, and S/390, these details have changed
6614
+ between different versions of GCC and/or different versions of the C
6615
+ or C++ language standards in ways that affect binary compatibility of
6616
+ compiled code. With @option{-Wpsabi}, GCC can detect potentially
6617
+ incompatible usages and warn you about them.
6612
6618
6613
- @smallexample
6614
- union U @{
6615
- long double ld;
6616
- int i;
6617
- @};
6618
- @end smallexample
6619
-
6620
- @noindent
6621
- @code{union U} is now always passed in memory.
6622
-
6623
- @end itemize
6619
+ @option{-Wpsabi} is enabled by default, and is also implied by
6620
+ @option{-Wabi}.
6624
6621
6625
6622
@opindex Wchanges-meaning
6626
6623
@opindex Wno-changes-meaning
@@ -32452,18 +32449,18 @@ and for AIX: @samp{vec-extabi}, @samp{vec-default}@.
32452
32449
Change the current ABI to use IBM extended-precision long double.
32453
32450
This is not likely to work if your system defaults to using IEEE
32454
32451
extended-precision long double. If you change the long double type
32455
- from IEEE extended-precision, the compiler will issue a warning unless
32456
- you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128}
32457
- to be enabled.
32452
+ from IEEE extended-precision, the compiler issues a warning unless
32453
+ you use the @option{-Wno-psabi} option (@pxref{Warning Options}).
32454
+ Requires @option{-mlong-double-128} to be enabled.
32458
32455
32459
32456
@opindex mabi=ieeelongdouble
32460
32457
@item -mabi=ieeelongdouble
32461
32458
Change the current ABI to use IEEE extended-precision long double.
32462
32459
This is not likely to work if your system defaults to using IBM
32463
32460
extended-precision long double. If you change the long double type
32464
- from IBM extended-precision, the compiler will issue a warning unless
32465
- you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128}
32466
- to be enabled.
32461
+ from IBM extended-precision, the compiler issues a warning unless
32462
+ you use the @option{-Wno-psabi} option (@pxref{Warning Options}).
32463
+ Requires @option{-mlong-double-128} to be enabled.
32467
32464
32468
32465
@opindex mabi=elfv1
32469
32466
@item -mabi=elfv1
0 commit comments