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
c86af7f3
Commit
c86af7f3
authored
Nov 02, 2010
by
Janne Blomqvist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PR 45629 Remove usage of setjmp/longjmp
From-SVN: r166180
parent
6f1abb06
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
12 deletions
+37
-12
libgfortran/ChangeLog
+29
-0
libgfortran/io/io.h
+4
-3
libgfortran/io/list_read.c
+0
-0
libgfortran/io/transfer.c
+4
-9
No files found.
libgfortran/ChangeLog
View file @
c86af7f3
2010-11-02 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/45629
* io/io.h: Remove setjmp.h include.
(st_parameter_dt): Change last_char to int, remove eof_jump.
* io/list_read.c (next_char): Return EOF instead of jumping.
(unget_char): Use int to be able to handle EOF.
(eat_spaces): Handle EOF return from next_char.
(eat_line): Likewise.
(eat_separator): Handle EOF return from next_char, eat_spaces,
eat_line.
(finish_separator): Likewise.
(convert_integer): Likewise.
(read_logical): Likewise.
(read_integer): Likewise.
(read_character): Likewise.
(parse_real): Likewise.
(read_complex): Likewise.
(read_real): Likewise.
(list_formatted_read_scalar): Likewise.
(list_formatted_read): Likewise.
(finish_list_read): Likewise.
(nml_parse_qualifier): Likewise.
(nml_match_name): Likewise.
(nml_get_obj_data): Likewise.
(namelist_read): Likewise.
* io/transfer.c (data_transfer_init): Initialize last_char.
(finalize_transfer): Remove jmp_buf setup.
2010-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2010-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/46010
PR libgfortran/46010
...
...
libgfortran/io/io.h
View file @
c86af7f3
...
@@ -31,7 +31,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
...
@@ -31,7 +31,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "libgfortran.h"
#include "libgfortran.h"
#include <setjmp.h>
#include <gthr.h>
#include <gthr.h>
/* Forward declarations. */
/* Forward declarations. */
...
@@ -427,7 +426,10 @@ typedef struct st_parameter_dt
...
@@ -427,7 +426,10 @@ typedef struct st_parameter_dt
unsigned
format_not_saved
:
1
;
unsigned
format_not_saved
:
1
;
/* 14 unused bits. */
/* 14 unused bits. */
char
last_char
;
/* Used for ungetc() style functionality. Possible values
are an unsigned char, EOF, or EOF - 1 used to mark the
field as not valid. */
int
last_char
;
char
nml_delim
;
char
nml_delim
;
int
repeat_count
;
int
repeat_count
;
...
@@ -438,7 +440,6 @@ typedef struct st_parameter_dt
...
@@ -438,7 +440,6 @@ typedef struct st_parameter_dt
char
*
scratch
;
char
*
scratch
;
char
*
line_buffer
;
char
*
line_buffer
;
struct
format_data
*
fmt
;
struct
format_data
*
fmt
;
jmp_buf
*
eof_jump
;
namelist_info
*
ionml
;
namelist_info
*
ionml
;
/* A flag used to identify when a non-standard expanded namelist read
/* A flag used to identify when a non-standard expanded namelist read
has occurred. */
has occurred. */
...
...
libgfortran/io/list_read.c
View file @
c86af7f3
This diff is collapsed.
Click to expand it.
libgfortran/io/transfer.c
View file @
c86af7f3
...
@@ -2666,7 +2666,10 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag)
...
@@ -2666,7 +2666,10 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag)
else
else
{
{
if
((
cf
&
IOPARM_DT_LIST_FORMAT
)
!=
0
)
if
((
cf
&
IOPARM_DT_LIST_FORMAT
)
!=
0
)
dtp
->
u
.
p
.
transfer
=
list_formatted_read
;
{
dtp
->
u
.
p
.
last_char
=
EOF
-
1
;
dtp
->
u
.
p
.
transfer
=
list_formatted_read
;
}
else
else
dtp
->
u
.
p
.
transfer
=
formatted_transfer
;
dtp
->
u
.
p
.
transfer
=
formatted_transfer
;
}
}
...
@@ -3362,7 +3365,6 @@ next_record (st_parameter_dt *dtp, int done)
...
@@ -3362,7 +3365,6 @@ next_record (st_parameter_dt *dtp, int done)
static
void
static
void
finalize_transfer
(
st_parameter_dt
*
dtp
)
finalize_transfer
(
st_parameter_dt
*
dtp
)
{
{
jmp_buf
eof_jump
;
GFC_INTEGER_4
cf
=
dtp
->
common
.
flags
;
GFC_INTEGER_4
cf
=
dtp
->
common
.
flags
;
if
((
dtp
->
common
.
flags
&
IOPARM_DT_HAS_SIZE
)
!=
0
)
if
((
dtp
->
common
.
flags
&
IOPARM_DT_HAS_SIZE
)
!=
0
)
...
@@ -3394,13 +3396,6 @@ finalize_transfer (st_parameter_dt *dtp)
...
@@ -3394,13 +3396,6 @@ finalize_transfer (st_parameter_dt *dtp)
if
(
dtp
->
u
.
p
.
current_unit
==
NULL
)
if
(
dtp
->
u
.
p
.
current_unit
==
NULL
)
return
;
return
;
dtp
->
u
.
p
.
eof_jump
=
&
eof_jump
;
if
(
setjmp
(
eof_jump
))
{
generate_error
(
&
dtp
->
common
,
LIBERROR_END
,
NULL
);
return
;
}
if
((
cf
&
IOPARM_DT_LIST_FORMAT
)
!=
0
&&
dtp
->
u
.
p
.
mode
==
READING
)
if
((
cf
&
IOPARM_DT_LIST_FORMAT
)
!=
0
&&
dtp
->
u
.
p
.
mode
==
READING
)
{
{
finish_list_read
(
dtp
);
finish_list_read
(
dtp
);
...
...
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