Re: [C++ Patch] Fix 66243, silent cast of scoped enum

2015-05-25 Thread Jason Merrill
On 05/24/2015 07:20 PM, Nathan Sidwell wrote: - else if (! INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value))) + else if (! INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P + (TREE_TYPE (value))) value = perform_implicit_conversion_flags

Re: [C++ Patch] Fix 66243, silent cast of scoped enum

2015-05-25 Thread Nathan Sidwell
On 05/25/15 15:43, Jason Merrill wrote: On 05/24/2015 07:20 PM, Nathan Sidwell wrote: - else if (! INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value))) + else if (! INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P + (TREE_TYPE (value))) value =

Re: [C++ Patch] Fix 66243, silent cast of scoped enum

2015-05-25 Thread Jason Merrill
On 05/25/2015 04:14 PM, Nathan Sidwell wrote: On 05/25/15 15:43, Jason Merrill wrote: On 05/24/2015 07:20 PM, Nathan Sidwell wrote: - else if (! INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value))) + else if (! INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P + (TREE_TYPE (value)))

[C++ Patch] Fix 66243, silent cast of scoped enum

2015-05-24 Thread Nathan Sidwell
This is a pretty obvious patch. We were permitting a scoped enum initializer of an another enum to silently decay to int. That's not right, only unscoped enums have that privilege. committed. nathan 2015-05-24 Nathan Sidwell nat...@acm.org cp/ PR c++/66243 * decl.c (build_enumerator):