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
Kirill Smelkov
cython
Commits
6009ccf9
Commit
6009ccf9
authored
Jan 23, 2018
by
scoder
Committed by
GitHub
Jan 23, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2081 from chris-b1/directive-docs
Add warnings to compiler directive docs
parents
a4398a4e
07968d8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
docs/src/reference/compilation.rst
docs/src/reference/compilation.rst
+31
-0
No files found.
docs/src/reference/compilation.rst
View file @
6009ccf9
...
...
@@ -588,6 +588,37 @@ Configurable optimisations
completely wrong.
Disabling this option can also reduce the code size. Default is True.
Warnings
--------
All warning directives take True / False as options
to turn the warning on / off.
``warn.undeclared`` (default False)
Warns about any variables that are implicitly declared without a ``cdef`` declaration
``warn.unreachable`` (default True)
Warns about code paths that are statically determined to be unreachable, e.g.
returning twice unconditionally.
``warn.maybe_uninitialized`` (default False)
Warns about use of variables that are conditionally uninitialized.
``warn.unused`` (default False)
Warns about unused variables and declarations
``warn.unused_arg`` (default False)
Warns about unused function arguments
``warn.unused_result`` (default False)
Warns about unused assignment to the same name, such as
``r = 2; r = 1 + 2``
``warn.multiple_declarators`` (default True)
Warns about multiple variables declared on the same line with at least one pointer type.
For example ``cdef double* a, b`` - which, as in C, declares ``a`` as a pointer, ``b`` as
a value type, but could be mininterpreted as declaring two pointers.
How to set directives
---------------------
...
...
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