summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-04-27 12:02:38 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-05-17 13:58:58 +0100
commitd8a656d5b6246457e84934bc35115c134bc38def (patch)
tree0d1336f8c7d871cb97ffab8553ac75dcfa0249f3
parent80bb0b8a81fdc5d0a1c88ae3febd593868daa752 (diff)
downloadgcc-d8a656d5b6246457e84934bc35115c134bc38def.tar.gz
doc: Describe behaviour of enums with fixed underlying type [PR109532]
gcc/ChangeLog: PR c++/109532 * doc/invoke.texi (Code Gen Options): Note that -fshort-enums is ignored for a fixed underlying type. (C++ Dialect Options): Likewise for -fstrict-enums. Reviewed-by: Marek Polacek <polacek@redhat.com>
-rw-r--r--gcc/doc/invoke.texi4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 2c525762171..ee78591c73e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -3495,6 +3495,8 @@ defined in the C++ standard; basically, a value that can be
represented in the minimum number of bits needed to represent all the
enumerators). This assumption may not be valid if the program uses a
cast to convert an arbitrary integer value to the enumerated type.
+This option has no effect for an enumeration type with a fixed underlying
+type.
@opindex fstrong-eval-order
@item -fstrong-eval-order
@@ -18306,6 +18308,8 @@ Use it to conform to a non-default application binary interface.
Allocate to an @code{enum} type only as many bytes as it needs for the
declared range of possible values. Specifically, the @code{enum} type
is equivalent to the smallest integer type that has enough room.
+This option has no effect for an enumeration type with a fixed underlying
+type.
@strong{Warning:} the @option{-fshort-enums} switch causes GCC to generate
code that is not binary compatible with code generated without that switch.