Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
76543000
Commit
76543000
authored
Oct 27, 2001
by
Kriang Lerdsuwanakij
Committed by
Kriang Lerdsuwanakij
Oct 27, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
From-SVN: r46565
parent
7dddfb65
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
gcc/cp/ChangeLog
+4
-0
gcc/cp/decl2.c
+5
-0
gcc/testsuite/g++.dg/lookup/using2.C
+2
-0
No files found.
gcc/cp/ChangeLog
View file @
76543000
2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
2001-10-25 Zack Weinberg <zack@codesourcery.com>
2001-10-25 Zack Weinberg <zack@codesourcery.com>
* cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
* cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
...
...
gcc/cp/decl2.c
View file @
76543000
...
@@ -4877,6 +4877,11 @@ validate_nonmember_using_decl (decl, scope, name)
...
@@ -4877,6 +4877,11 @@ validate_nonmember_using_decl (decl, scope, name)
*
scope
=
global_namespace
;
*
scope
=
global_namespace
;
*
name
=
decl
;
*
name
=
decl
;
}
}
else
if
(
TREE_CODE
(
decl
)
==
NAMESPACE_DECL
)
{
cp_error
(
"namespace `%D' not allowed in using-declaration"
,
decl
);
return
NULL_TREE
;
}
else
else
my_friendly_abort
(
382
);
my_friendly_abort
(
382
);
if
(
DECL_P
(
*
name
))
if
(
DECL_P
(
*
name
))
...
...
gcc/testsuite/g++.dg/lookup/using2.C
View file @
76543000
...
@@ -25,6 +25,8 @@ namespace N
...
@@ -25,6 +25,8 @@ namespace N
template
<
int
>
void
f
()
{}
template
<
int
>
void
f
()
{}
}
}
using
N
;
// { dg-error "parse error" "" }
using
::
N
;
// { dg-error "using-declaration" "" }
using
N
::
f
<
0
>
;
// { dg-error "using-declaration" "" }
using
N
::
f
<
0
>
;
// { dg-error "using-declaration" "" }
struct
A
{
struct
A
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment