This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11507] parser fails to recognize namespace; regression to 3.3
- From: "kai-gcc-bugs at khms dot westfalen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2003 18:27:21 -0000
- Subject: [Bug c++/11507] parser fails to recognize namespace; regression to 3.3
- References: <20030712161306.11507.kai-gcc-bugs@khms.westfalen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
------- Additional Comments From kai-gcc-bugs at khms dot westfalen dot de 2003-07-12 18:27 -------
Just in case you're curious what on earth this is trying to do:
It's a C++ wrapper for curses, which tries to be namespace clean by first
importing all the definitions into a special encapsulation namespace, then
(essentially) using the .ii file generated from this as a header file and
implementing another final encapsulation.
Very approximately, and with some detail left out,
namespace n1 {
#include ...
encap_function() { return function(); }
}
#include "previous.ii"
namespace n2 {
function() { n1::encap_function(); }
}
In the end, inlining should leave just the bare references to the C library
functions. So far, this seems to work perfectly (except for this bug, when I
wanted to see some C-syntax tree dumps, and know if there were bugs the old
parser didn't catch, and tried HEAD and tree-ssa on my source.)