summaryrefslogtreecommitdiff
path: root/gcc/cp/cvt.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 15:09:29 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 15:09:29 +0000
commit9fd75d525b510af57a2ca7a536a18930506e2cd1 (patch)
tree7b362ff7ad48bea5b1140d97d5790865a4121aeb /gcc/cp/cvt.c
parente4701ee934076ca4197c73d16fe42cff12e2b158 (diff)
downloadgcc-9fd75d525b510af57a2ca7a536a18930506e2cd1.tar.gz
PR c++/48780
* typeck.c (perform_integral_promotions): Don't promote scoped enums. * call.c (convert_arg_to_ellipsis): Promote them here in old ABI. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174751 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r--gcc/cp/cvt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index e5d5361ac28..8a23d5199f6 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -1616,7 +1616,8 @@ type_promotes_to (tree type)
if (TREE_CODE (type) == BOOLEAN_TYPE)
type = integer_type_node;
- /* scoped enums don't promote. */
+ /* Scoped enums don't promote, but pretend they do for backward ABI bug
+ compatibility wrt varargs. */
else if (SCOPED_ENUM_P (type) && abi_version_at_least (6))
;