On Tue, Jul 29, 2025 at 10:29:37PM +0200, Harald Anlauf wrote: > > - I am a little confused about the handling of the access specification. > After the first "public :: g", NAG complains about the > > generic, public :: g ... > > and only allows > > generic :: g ... > > Then duplicate public specifications are not allowed. What do you think? >
First, apologies to Paul. I was hoping to review the patch this weekend. As I approved Mikael's recent patches involving array descriptors that broken codes using polymoriphism. I was trying to understand that problem. I think NAG is correct to complain. It took me a bit of standard sleuthing to find the constraint. 8.5.1 Attribute specification ... C815 An entity shall not be explicitly given any attribute more than once in a scoping unit. Thus, generic, public :: foo => bar generic, public :: foo => bah should raise an error. The correct construct is either generic, public :: foo => bar generic :: foo => bah or generic :: foo => bar generic, public :: foo => bah -- Steve