summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-03 21:16:40 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-03 21:16:40 +0000
commitbb9c1a09933d3b672bedb16747761d478245dddc (patch)
treef66f3527bad37dd8ad2f5c0b5d0966b9ca678f5b /gcc/doc
parent3440fb35626fc2dd251b89bb90ccb32c8ace9789 (diff)
downloadgcc-bb9c1a09933d3b672bedb16747761d478245dddc.tar.gz
PR c++/43680
gcc: * c.opt (-fstrict-enums): New. * doc/invoke.texi (C++ Dialect Options): Document -fstrict-enums. gcc/cp: * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE from the selected underlying type unless -fstrict-enums. Set ENUM_UNDERLYING_TYPE to have the restricted range. * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE. * class.c (check_bitfield_decl): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159006 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index fefb0abd1d5..b2fbd48becd 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1982,6 +1982,15 @@ unambiguous base classes.
Emit statistics about front-end processing at the end of the compilation.
This information is generally only useful to the G++ development team.
+@item -fstrict-enums
+@opindex fstrict-enums
+Allow the compiler to optimize using the assumption that a value of
+enumeration type can only be one of the values of the enumeration (as
+defined in the C++ standard; basically, a value which 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 enumeration type.
+
@item -ftemplate-depth=@var{n}
@opindex ftemplate-depth
Set the maximum instantiation depth for template classes to @var{n}.