Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
acc59b85
Commit
acc59b85
authored
Sep 30, 2002
by
Anthony Green
Committed by
Anthony Green
Sep 30, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add -fno-assert flag.
From-SVN: r57649
parent
48ddd46c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
5 deletions
+52
-5
gcc/java/ChangeLog
+15
-0
gcc/java/gcj.texi
+12
-2
gcc/java/java-tree.h
+4
-0
gcc/java/jv-scan.c
+4
-0
gcc/java/jvspec.c
+1
-1
gcc/java/lang.c
+5
-1
gcc/java/lex.c
+9
-1
gcc/java/parse-scan.y
+2
-0
No files found.
gcc/java/ChangeLog
View file @
acc59b85
2002-09-28 Anthony Green <green@redhat.com>
* gcj.texi (Invoking jv-scan): Add --no-assert documentation.
(Code Generation): Add -fno-assert documentation.
* jv-scan.c (flag_assert): New global.
(options): Add assert option.
(help): Add --no-assert documentation.
* parse-scan.y (flag_assert): New global.
* lang.c (lang_f_options): Add -fassert/-fno-assert support.
(flag_assert): New global.
* java-tree.h (flag_assert): New global.
* lex.c (java_lex): Obey flag_assert.
* jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
calling cc1.
2002-09-26 Andrew Haley <aph@redhat.com>
* expr.c (build_java_array_length_access): Check for null pointer.
...
...
gcc/java/gcj.texi
View file @
acc59b85
...
...
@@ -428,6 +428,10 @@ using JNI, then you must use @code{-fjni}. This option causes
@command{gcj} to generate stubs which will invoke the underlying JNI
methods.
@item -fno-assert
Don'
t
recognize
the
@
code
{
assert
}
keyword
.
This
is
for
compatibility
with
older
versions
of
the
language
specification
.
@
item
-
fno
-
optimize
-
static
-
class
-
initialization
When
the
optimization
level
is
greater
or
equal
to
@
code
{-
O2
},
@
command
{
gcj
}
will
try
to
optimize
the
way
calls
into
the
runtime
are
made
...
...
@@ -622,8 +626,9 @@ source file (@file{.java} file).
@
ignore
@
c
man
begin
SYNOPSIS
jv
-
scan
jv-scan [@option{--complexity}] [@option{--encoding}=@var{name}]
[@option{--print-main}] [@option{--list-class}] [@option{--list-filename}]
jv
-
scan
[@
option
{--
no
-
assert
}]
[@
option
{--
complexity
}]
[@
option
{--
encoding
}=@
var
{
name
}]
[@
option
{--
print
-
main
}]
[@
option
{--
list
-
class
}]
[@
option
{--
list
-
filename
}]
[@
option
{--
version
}]
[@
option
{--
help
}]
[@
option
{-
o
}
@
var
{
file
}]
@
var
{
inputfile
}@
dots
{}
@
c
man
end
...
...
@@ -636,6 +641,11 @@ and the Info entries for @file{gcj} and @file{gcc}.
@
c
man
begin
OPTIONS
jv
-
scan
@
table
@
gcctabopt
@
item
--
no
-
assert
Don
't recognize the @code{assert} keyword, for backwards compatibility
with older versions of the language specification.
@table @gcctabopt
@item --complexity
This prints a complexity measure, related to cyclomatic complexity, for
each input file.
...
...
gcc/java/java-tree.h
View file @
acc59b85
...
...
@@ -160,6 +160,10 @@ extern int flag_emit_class_files;
extern
int
flag_filelist_file
;
/* When nonzero, permit the use of the assert keyword. */
extern
int
flag_assert
;
/* When nonzero, assume all native functions are implemented with
JNI, not CNI. */
...
...
gcc/java/jv-scan.c
View file @
acc59b85
...
...
@@ -64,6 +64,7 @@ int flag_find_main = 0;
int
flag_dump_class
=
0
;
int
flag_list_filename
=
0
;
int
flag_complexity
=
0
;
int
flag_assert
=
1
;
int
pedantic
=
0
;
...
...
@@ -85,6 +86,8 @@ static const struct option options[] =
{
"list-class"
,
no_argument
,
&
flag_dump_class
,
1
},
{
"encoding"
,
required_argument
,
NULL
,
OPT_ENCODING
},
{
"complexity"
,
no_argument
,
&
flag_complexity
,
1
},
{
"no-assert"
,
no_argument
,
&
flag_assert
,
0
},
{
"assert"
,
no_argument
,
&
flag_assert
,
1
},
{
NULL
,
no_argument
,
NULL
,
0
}
};
...
...
@@ -100,6 +103,7 @@ help ()
{
printf
(
"Usage: jv-scan [OPTION]... FILE...
\n\n
"
);
printf
(
"Print useful information read from Java source files.
\n\n
"
);
printf
(
" --no-assert Don't recognize the assert keyword
\n
"
);
printf
(
" --complexity Print cyclomatic complexity of input file
\n
"
);
printf
(
" --encoding NAME Specify encoding of input file
\n
"
);
printf
(
" --print-main Print name of class containing `main'
\n
"
);
...
...
gcc/java/jvspec.c
View file @
acc59b85
...
...
@@ -62,7 +62,7 @@ static const char jvgenmain_spec[] =
%{v:-version} %{pg:-p} %{p}\
%{<fbounds-check} %{<fno-bounds-check}\
%{<fassume-compiled} %{<fno-assume-compiled}\
%{<fcompile-resource*}\
%{<fcompile-resource*}
%{<fassert} %{<fno-assert}
\
%{<femit-class-file} %{<femit-class-files} %{<fencoding*}\
%{<fuse-boehm-gc} %{<fhash-synchronization} %{<fjni}\
%{<findirect-dispatch} \
...
...
gcc/java/lang.c
View file @
acc59b85
...
...
@@ -147,6 +147,9 @@ int flag_use_boehm_gc = 0;
object to its synchronization structure. */
int
flag_hash_synchronization
;
/* When nonzero, permit the use of the assert keyword. */
int
flag_assert
=
1
;
/* When nonzero, assume all native functions are implemented with
JNI, not CNI. */
int
flag_jni
=
0
;
...
...
@@ -205,7 +208,8 @@ lang_f_options[] =
{
"force-classes-archive-check"
,
&
flag_force_classes_archive_check
,
1
},
{
"optimize-static-class-initialization"
,
&
flag_optimize_sci
,
1
},
{
"indirect-dispatch"
,
&
flag_indirect_dispatch
,
1
},
{
"store-check"
,
&
flag_store_check
,
1
}
{
"store-check"
,
&
flag_store_check
,
1
},
{
"assert"
,
&
flag_assert
,
1
}
};
static
const
struct
string_option
...
...
gcc/java/lex.c
View file @
acc59b85
...
...
@@ -1604,6 +1604,15 @@ java_lex (java_lval)
SET_LVAL_NODE
(
null_pointer_node
);
return
NULL_TK
;
case
ASSERT_TK
:
if
(
flag_assert
)
{
BUILD_OPERATOR
(
kw
->
token
);
return
kw
->
token
;
}
else
break
;
/* Some keyword we want to retain information on the location
they where found. */
case
CASE_TK
:
...
...
@@ -1617,7 +1626,6 @@ java_lex (java_lval)
case
CATCH_TK
:
case
THROW_TK
:
case
INSTANCEOF_TK
:
case
ASSERT_TK
:
BUILD_OPERATOR
(
kw
->
token
);
default
:
...
...
gcc/java/parse-scan.y
View file @
acc59b85
...
...
@@ -135,6 +135,8 @@ void report PARAMS ((void));
}
%{
extern int flag_assert;
#include "lex.c"
%}
...
...
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