[cfe-dev] static const POD object
Dmitri Gribenko
gribozavr at gmail.com
Tue Feb 19 03:34:13 PST 2013
On Tue, Feb 19, 2013 at 10:13 AM, zapadinsky <zapadinsky at gmail.com> wrote:
> And it is not a compiler defect.
It is a defect or an extension, depending on whether it was intentional or not.
> But why not to weaken this restriction by
> default? What harm can it cause? Clang is not a standard compliance tester.
Clang is a standards-conforming compiler. Throwing in extensions
randomly is a disservice for users, because it allows them to write
code that is not conforming, and thus non-portable between compilers.
Your codebase is actually suffering from such behavior in MSVC now --
the codebase has code that compiles and works, despite not being valid
C++.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-dev
mailing list