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
63abcdc0
Commit
63abcdc0
authored
Jan 29, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add command line flag --warning-errors and gcc compat alias -Werror
parent
e8cc17ab
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
Cython/Compiler/CmdLine.py
Cython/Compiler/CmdLine.py
+3
-0
Cython/Compiler/Errors.py
Cython/Compiler/Errors.py
+2
-0
Cython/Compiler/Options.py
Cython/Compiler/Options.py
+3
-0
No files found.
Cython/Compiler/CmdLine.py
View file @
63abcdc0
...
...
@@ -38,6 +38,7 @@ Options:
-2 Compile based on Python-2 syntax and code semantics.
-3 Compile based on Python-3 syntax and code semantics.
--fast-fail Abort the compilation on the first error
--warning-error, -Werror Make all warnings into errors
-X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
"""
...
...
@@ -131,6 +132,8 @@ def parse_command_line(args):
options
.
language_level
=
3
elif
option
==
"--fast-fail"
:
Options
.
fast_fail
=
True
elif
option
in
(
'-Werror'
,
'--warning-errors'
):
Options
.
warning_errors
=
True
elif
option
==
"--disable-function-redefinition"
:
Options
.
disable_function_redefinition
=
True
elif
option
in
(
"-X"
,
"--directive"
):
...
...
Cython/Compiler/Errors.py
View file @
63abcdc0
...
...
@@ -176,6 +176,8 @@ def message(position, message, level=1):
def
warning
(
position
,
message
,
level
=
0
):
if
level
<
LEVEL
:
return
if
Options
.
warning_errors
:
return
error
(
position
,
message
)
warn
=
CompileWarning
(
position
,
message
)
line
=
"warning: %s
\
n
"
%
warn
if
listing_file
:
...
...
Cython/Compiler/Options.py
View file @
63abcdc0
...
...
@@ -22,6 +22,9 @@ annotate = False
# to keep going and printing further error messages.
fast_fail
=
False
# Make all warnings into errors.
warning_errors
=
False
# This will convert statements of the form "for i in range(...)"
# to "for i from ..." when i is a cdef'd integer type, and the direction
# (i.e. sign of step) can be determined.
...
...
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