Is the following allowed by the standard?
#include <iostream> extern int a; auto a = 3; int main(int, char**) { std::cout << a << std::endl; return 0; }
clang accepts the code. g++ complains for conflicting declaration.
Aucun commentaire:
Enregistrer un commentaire