[PATCH] C++: show namespaces for enum values (PR c++/88121)

2018-11-21 Thread David Malcolm
Consider this test case: namespace json { enum { JSON_OBJECT }; } void test () { JSON_OBJECT; } which erroneously accesses an enum value in another namespace without qualifying the access. GCC 6 through 8 issue a suggestion that doesn't mention the namespace: : In function 'void test()': :

Re: [PATCH] C++: show namespaces for enum values (PR c++/88121)

2018-11-21 Thread Jason Merrill
On 11/21/18 8:35 AM, David Malcolm wrote: Consider this test case: namespace json { enum { JSON_OBJECT }; } void test () { JSON_OBJECT; } which erroneously accesses an enum value in another namespace without qualifying the access. GCC 6 through 8 issue a suggestion that doesn't mention