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
4dbd1e03
Commit
4dbd1e03
authored
May 01, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add control flow directives
parent
524cec9a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
Cython/Compiler/CmdLine.py
Cython/Compiler/CmdLine.py
+3
-0
Cython/Compiler/Options.py
Cython/Compiler/Options.py
+16
-0
No files found.
Cython/Compiler/CmdLine.py
View file @
4dbd1e03
...
@@ -39,6 +39,7 @@ Options:
...
@@ -39,6 +39,7 @@ Options:
-3 Compile based on Python-3 syntax and code semantics.
-3 Compile based on Python-3 syntax and code semantics.
--fast-fail Abort the compilation on the first error
--fast-fail Abort the compilation on the first error
--warning-error, -Werror Make all warnings into errors
--warning-error, -Werror Make all warnings into errors
--warning-extra, -Wextra Enable extra warnings
-X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
-X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
"""
"""
...
@@ -132,6 +133,8 @@ def parse_command_line(args):
...
@@ -132,6 +133,8 @@ def parse_command_line(args):
Options
.
fast_fail
=
True
Options
.
fast_fail
=
True
elif
option
in
(
'-Werror'
,
'--warning-errors'
):
elif
option
in
(
'-Werror'
,
'--warning-errors'
):
Options
.
warning_errors
=
True
Options
.
warning_errors
=
True
elif
option
in
(
'-Wextra'
,
'--warning-extra'
):
options
.
compiler_directives
.
update
(
Options
.
extra_warnings
)
elif
option
==
"--disable-function-redefinition"
:
elif
option
==
"--disable-function-redefinition"
:
Options
.
disable_function_redefinition
=
True
Options
.
disable_function_redefinition
=
True
elif
option
==
"--directive"
or
option
.
startswith
(
'-X'
):
elif
option
==
"--directive"
or
option
.
startswith
(
'-X'
):
...
...
Cython/Compiler/Options.py
View file @
4dbd1e03
...
@@ -95,10 +95,19 @@ directive_defaults = {
...
@@ -95,10 +95,19 @@ directive_defaults = {
'warn'
:
None
,
'warn'
:
None
,
'warn.undeclared'
:
False
,
'warn.undeclared'
:
False
,
'warn.unreachable'
:
True
,
'warn.unreachable'
:
True
,
'warn.maybe_uninitialized'
:
False
,
'warn.unreachable'
:
True
,
'warn.unused'
:
False
,
'warn.unused_arg'
:
False
,
'warn.unused_result'
:
False
,
# remove unreachable code
# remove unreachable code
'remove_unreachable'
:
True
,
'remove_unreachable'
:
True
,
# control flow debug directives
'control_flow.dot_output'
:
""
,
# Graphviz output filename
'control_flow.dot_annotate_defs'
:
False
,
# Annotate definitions
# test support
# test support
'test_assert_path_exists'
:
[],
'test_assert_path_exists'
:
[],
'test_fail_if_path_exists'
:
[],
'test_fail_if_path_exists'
:
[],
...
@@ -107,6 +116,13 @@ directive_defaults = {
...
@@ -107,6 +116,13 @@ directive_defaults = {
'binding'
:
False
,
'binding'
:
False
,
}
}
# Extra warning directives
extra_warnings
=
{
'warn.maybe_uninitialized'
:
True
,
'warn.unreachable'
:
True
,
'warn.unused'
:
True
,
}
# Override types possibilities above, if needed
# Override types possibilities above, if needed
directive_types
=
{
directive_types
=
{
'final'
:
bool
,
# final cdef classes and methods
'final'
:
bool
,
# final cdef classes and methods
...
...
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