-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b22
When building with clang and changing a file that is part of the precompiled header, you can get:
fatal error: file '/Users/staffan/mercurial/jdk9-hs-rt/hotspot/src/share/vm/runtime/thread.hpp' has been modified since the precompiled header was built
clang behaves differently than gcc here.
Example with clang:
$ ls
test.h
$ cat test.h
#include <stdio.h>
$ clang -x c-header -include test.h test.h -o test.h.pch
$ touch test.h
$ clang -x c-header -include test.h test.h -o test.h.pch
fatal error: file '/Users/staffan/tmp/pch/test.h' has been modified since the precompiled header was built
1 error generated.
Same with gcc:
$ ls
test.h
$ cat test.h
#include <stdio.h>
$ gcc -x c-header -include test.h test.h -o test.h.pch
$ touch test.h
$ gcc -x c-header -include test.h test.h -o test.h.pch
fatal error: file '/Users/staffan/mercurial/jdk9-hs-rt/hotspot/src/share/vm/runtime/thread.hpp' has been modified since the precompiled header was built
clang behaves differently than gcc here.
Example with clang:
$ ls
test.h
$ cat test.h
#include <stdio.h>
$ clang -x c-header -include test.h test.h -o test.h.pch
$ touch test.h
$ clang -x c-header -include test.h test.h -o test.h.pch
fatal error: file '/Users/staffan/tmp/pch/test.h' has been modified since the precompiled header was built
1 error generated.
Same with gcc:
$ ls
test.h
$ cat test.h
#include <stdio.h>
$ gcc -x c-header -include test.h test.h -o test.h.pch
$ touch test.h
$ gcc -x c-header -include test.h test.h -o test.h.pch