나는 Clang.
Clang에서 버그를 발견 했습니까?
[email protected] ~ $ clang++ --version
clang version 2.8 (trunk 107611)
Target: i386-pc-linux-gnu
Thread model: posix
[email protected] ~ $ cat bug.cpp
class Prasoon{
private:
static const int dummy = 0;
};
int const Prasoon::dummy = 0;
int main(){}
[email protected] ~ $ clang++ bug.cpp
[email protected] ~ $
컴파일하지만 g++
와 동일한 코드를 컴파일 할 때 오류가 왔을 때 어떤 오류를 포기하지 않았다 Clang
class Prasoon{
static const int dummy = 0;
};
int const Prasoon::dummy = 0;
int main(){}
위의 코드를 아래의 코드를 컴파일하려고 예상대로
[email protected] ~ $ g++ bug.cpp
bug.cpp:8: error: duplicate initialization of ‘Prasoon::dummy’
그래서 Clang
에 버그를 발견 했습니까?
사용중인 clang 버전은 무엇입니까? Mac의 1.5는 g ++ 4.2.1과 동일한 출력을 제공합니다. – Eiko
샘플 출력 : clang 버전 2.8 (트렁크 107611) – Douglas
글쎄, 편집하기 전에는 아니었다 .-) – Eiko