Re: duplicate using declarations

2019-03-14 Thread Paolo Carlini

Hi Nathan,

On 14/03/19 16:59, Nathan Sidwell wrote:

I see this is DR 36.
http://wiki.edg.com/pub/Wg21kona2019/CoreWorkingGroup/cwg_active.html#36

I still think we should drop this check, for one thing we don't apply 
it consistently (eg, naming an unscoped enum value).


I see that for example current icc enforces the check whereas current 
clang doesn't. Given that the DR is still Open and we changed our 
behavior relatively recently, first blush it doesn't seem 
straightforward to me that we should change it again. That said, I would 
be curious to know why the example has been removed... Not a big deal, 
anyway, if dropping the check makes sense in the bigger picture 
certainly I'm not going to insist ;)


Paolo.



Re: duplicate using declarations

2019-03-14 Thread Nathan Sidwell

I see this is DR 36.
http://wiki.edg.com/pub/Wg21kona2019/CoreWorkingGroup/cwg_active.html#36

I still think we should drop this check, for one thing we don't apply it 
consistently (eg, naming an unscoped enum value).


On 3/14/19 11:47 AM, Nathan Sidwell wrote:

Jason, Paolo,

This concerns:
namespace N
{
   int i;
}

void
f ()
{
   using N::i;
   using N::i;   // { dg-error "declared" }
}

which is extracted from g++.dg/lookup/using53.C added fixing 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20420


The comment mentions C++11 7.3.3/10, which does give this as an error, 
but confusingly permits the duplicate decl if we were at namespace 
scope.  That seems wrong to me, and indeed in the current WD, (moved to 
9.8/10) the fn example is removed.  Presumably making it as well formed 
as the namespace example.


Ok with dropping this check entirely? There's a bunch of obsolete using 
decl code I'd like to kill before adding support to modules.


nathan




--
Nathan Sidwell


duplicate using declarations

2019-03-14 Thread Nathan Sidwell

Jason, Paolo,

This concerns:
namespace N
{
  int i;
}

void
f ()
{
  using N::i;
  using N::i;   // { dg-error "declared" }
}

which is extracted from g++.dg/lookup/using53.C added fixing 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20420


The comment mentions C++11 7.3.3/10, which does give this as an error, 
but confusingly permits the duplicate decl if we were at namespace 
scope.  That seems wrong to me, and indeed in the current WD, (moved to 
9.8/10) the fn example is removed.  Presumably making it as well formed 
as the namespace example.


Ok with dropping this check entirely? There's a bunch of obsolete using 
decl code I'd like to kill before adding support to modules.


nathan

--
Nathan Sidwell