Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
c71adccb
Commit
c71adccb
authored
Feb 19, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make cpp redeclaration an error (vs. a compiler crash). Fixes #523.
parent
11fd96e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-0
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+2
-1
No files found.
Cython/Compiler/Nodes.py
View file @
c71adccb
...
...
@@ -1057,6 +1057,8 @@ class CppClassNode(CStructOrUnionDefNode):
self
.
entry
=
env
.
declare_cpp_class
(
self
.
name
,
scope
,
self
.
pos
,
self
.
cname
,
base_class_types
,
visibility
=
self
.
visibility
,
templates
=
template_types
)
if
self
.
entry
is
None
:
return
self
.
entry
.
is_cpp_class
=
1
if
self
.
attributes
is
not
None
:
if
self
.
in_pxd
and
not
env
.
in_cinclude
:
...
...
Cython/Compiler/Symtab.py
View file @
c71adccb
...
...
@@ -449,7 +449,8 @@ class Scope(object):
visibility = visibility, defining = scope is not None)
else:
if not (entry.is_type and entry.type.is_cpp_class):
warning(pos, "'%s'
redeclared
" % name, 0)
error(pos, "'%s'
redeclared
" % name)
return None
elif scope and entry.type.scope:
warning(pos, "'%s'
already
defined
(
ignoring
second
definition
)
" % name, 0)
else:
...
...
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