http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49837
Summary: File with UTF-8 BOM, included from pch, caused compilation error Product: gcc Version: 4.4.5 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: woodr...@gmail.com Created attachment 24823 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24823 Header file with bom gcc -v: Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) Failed attempt: g++ -x c++-header -c stable.h -o stable.gch/c++ g++ -include ./stable 1.cpp Output: In file included from stable.h:1, from 1.cpp:1: 1.h:4: error: redefinition of ‘template<class A, class B> B convert(A)’ 1.h:4: error: ‘template<class A, class B> B convert(A)’ previously declared here Successful: g++ 1.cpp Empty output.