https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117
Bug ID: 64117
Summary: warning control #pragmas in precompiled headers are
not obeyed for template code
Product: gcc
Version: 4.8.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Created attachment 34140
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34140&action=edit
A header file, a source file, and a RUNME script using them to demonstrate the
problem.
Temporarily disabling warnings surrounding template code works fine, except
when included in a precompiled header. Then, the warnings remain in effect, and
are triggered in any C++ code that uses the template.
In my project, this means I just can't use precompiled headers. We are missing
out on cutting down our build time as a result.
BTW, speaking of precompiled headers, it sucks that `#pragma once` is not
allowed when precompiling a header file ("#pragma once in main file"), but
that's a minor annoyance - one can switch back to the bad old days of guard
macros.