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
Boxiang Sun
cython
Commits
2439267d
Commit
2439267d
authored
Aug 18, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence CF warnings when taking address of C variable, fix ticket #714
parent
d95362ee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+7
-0
tests/run/ptr_warning_T714.pyx
tests/run/ptr_warning_T714.pyx
+15
-0
No files found.
Cython/Compiler/FlowControl.py
View file @
2439267d
...
...
@@ -1106,3 +1106,10 @@ class CreateControlFlowGraph(CythonTransform):
self
.
flow
.
nextblock
()
self
.
env
=
self
.
env_stack
.
pop
()
return
node
def
visit_AmpersandNode
(
self
,
node
):
if
node
.
operand
.
is_name
:
# Fake assignment to silence warning
self
.
mark_assignment
(
node
.
operand
)
self
.
visitchildren
(
node
)
return
node
tests/run/ptr_warning_T714.pyx
0 → 100644
View file @
2439267d
# mode: run
# tag: werror
# ticket: 714
def
test_ptr
():
"""
>>> test_ptr()
123
"""
cdef
int
a
cdef
int
*
ptr
ptr
=
&
a
ptr
[
0
]
=
123
return
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