This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46836] reporting locations for names in std namespace could be improved
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 May 2012 12:14:18 +0000
- Subject: [Bug c++/46836] reporting locations for names in std namespace could be improved
- Auto-submitted: auto-generated
- References: <bug-46836-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46836
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-29 12:14:18 UTC ---
(In reply to comment #2)
> #pragma GCC canonical_header [header-name] [identifier]
I don't think we even need to do it per-identifier.
If each standard header started with:
#pragma GCC canonical_header push [header-name]
and ended with:
#pragma GCC canonical_header pop
then we'd always know which header we're "in" when an error occurs, even for
nested headers (e.g. <fstream> includes <ios>) and helper files that are
included from many places (e.g. bits/stl_tree.h gets included by both <map> and
<set>)