diff options
author | Jason Merrill <jason@redhat.com> | 2007-08-22 13:23:37 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2007-08-22 13:23:37 -0400 |
commit | 6117220672481e5dea35a26a576b4794b5661d60 (patch) | |
tree | 15ee08cdd7c8f4fd56f28d2c93470b2102542aba /gcc/cp/pt.c | |
parent | 1840f0c27011ba23f29540d509b275e558fa4cb0 (diff) | |
download | gcc-6117220672481e5dea35a26a576b4794b5661d60.zip gcc-6117220672481e5dea35a26a576b4794b5661d60.tar.gz gcc-6117220672481e5dea35a26a576b4794b5661d60.tar.bz2 |
re PR c++/29365 (Unnecessary anonymous namespace warnings)
PR c++/29365
* pt.c (outermost_tinst_level): New function.
* lex.c (in_main_input_context): New function.
* decl2.c (constrain_class_visibility): Use it to avoid warning
about uses of the anonymous namespace in the main input file.
From-SVN: r127711
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3f218e6..b4a9b68 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6045,6 +6045,15 @@ reopen_tinst_level (tree level) pop_tinst_level (); } +/* Returns the TINST_LEVEL which gives the original instantiation + context. */ + +tree +outermost_tinst_level (void) +{ + return tree_last (current_tinst_level); +} + /* DECL is a friend FUNCTION_DECL or TEMPLATE_DECL. ARGS is the vector of template arguments, as for tsubst. |