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
6c548216
Commit
6c548216
authored
32 years ago
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(yylex): Don't warn about floating point out of range if target
floating-point format is IEEE. From-SVN: r4213
parent
9b553fdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
gcc/c-lex.c
+9
-5
No files found.
gcc/c-lex.c
View file @
6c548216
...
...
@@ -1486,7 +1486,8 @@ yylex ()
case
'f'
:
case
'F'
:
type
=
float_type_node
;
value
=
REAL_VALUE_ATOF
(
token_buffer
,
TYPE_MODE
(
type
));
if
(
REAL_VALUE_ISINF
(
value
)
&&
pedantic
)
if
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
&&
REAL_VALUE_ISINF
(
value
)
&&
pedantic
)
pedwarn
(
"floating point number exceeds range of `float'"
);
garbage_chars
=
-
1
;
break
;
...
...
@@ -1494,7 +1495,8 @@ yylex ()
case
'l'
:
case
'L'
:
type
=
long_double_type_node
;
value
=
REAL_VALUE_ATOF
(
token_buffer
,
TYPE_MODE
(
type
));
if
(
REAL_VALUE_ISINF
(
value
)
&&
pedantic
)
if
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
&&
REAL_VALUE_ISINF
(
value
)
&&
pedantic
)
pedwarn
(
"floating point number exceeds range of `long double'"
);
garbage_chars
=
-
1
;
...
...
@@ -1509,7 +1511,8 @@ yylex ()
default
:
value
=
REAL_VALUE_ATOF
(
token_buffer
,
TYPE_MODE
(
type
));
if
(
REAL_VALUE_ISINF
(
value
)
&&
pedantic
)
if
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
&&
REAL_VALUE_ISINF
(
value
)
&&
pedantic
)
pedwarn
(
"floating point number exceeds range of `double'"
);
}
set_float_handler
(
NULL_PTR
);
...
...
@@ -1519,8 +1522,9 @@ yylex ()
{
/* ERANGE is also reported for underflow,
so test the value to distinguish overflow from that. */
if
(
REAL_VALUES_LESS
(
dconst1
,
value
)
||
REAL_VALUES_LESS
(
value
,
dconstm1
))
if
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
&&
(
REAL_VALUES_LESS
(
dconst1
,
value
)
||
REAL_VALUES_LESS
(
value
,
dconstm1
)))
{
pedwarn
(
"floating point number exceeds range of `double'"
);
exceeds_double
=
1
;
...
...
This diff is collapsed.
Click to expand it.
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