------- Comment #4 from mmitchel at gcc dot gnu dot org 2005-10-18 06:28 ------- We all agree that in pedantic mode all three lines are erroneous, so let's just consider the non-pedantic case.
We can choose not to be picky about the non-dependent declarations because such code makes the program ill-formed; accepting such a program clearly does not change the behavior of any conforming program. But, for dependent declarations, we must be careful of SFINAE. If we do not reject instantiations that create types where type deduction fails, we can change the meaning of conforming programs -- and the absence of -pedantic should never change the meaning of a conforming program. So, we must issue an error for the dependent cases. I think that the right fix for this is to make the use of this extension an unconditional pedwarn in GNU C++, instead of "if (pedantic) pedwarn (...)" as it is now. That would still allow people to use -fpermissive to allow non-dependent zero-length arrays. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19989