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
f9dcab52
Commit
f9dcab52
authored
Jun 09, 1997
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(check_format_info): Correct handling of the 'a' flag which adds
another pointer level. From-SVN: r14176
parent
f428585b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
gcc/c-common.c
+7
-4
No files found.
gcc/c-common.c
View file @
f9dcab52
/* Subroutines shared by all languages that are variants of C.
Copyright (C) 1992,
1993, 1994, 1995, 1996
Free Software Foundation, Inc.
Copyright (C) 1992,
93, 94, 95, 96, 1997
Free Software Foundation, Inc.
This file is part of GNU CC.
...
...
@@ -1396,6 +1396,8 @@ check_format_info (info, params)
sprintf
(
message
,
"`a' flag used with `%c' format"
,
format_char
);
warning
(
message
);
/* To simplify the following code. */
aflag
=
0
;
}
if
(
info
->
is_scan
&&
format_char
==
'['
)
{
...
...
@@ -1485,7 +1487,7 @@ check_format_info (info, params)
/* Check the types of any additional pointer arguments
that precede the "real" argument. */
for
(
i
=
0
;
i
<
fci
->
pointer_count
;
++
i
)
for
(
i
=
0
;
i
<
fci
->
pointer_count
+
aflag
;
++
i
)
{
if
(
TREE_CODE
(
cur_type
)
==
POINTER_TYPE
)
{
...
...
@@ -1496,7 +1498,8 @@ check_format_info (info, params)
{
sprintf
(
message
,
"format argument is not a %s (arg %d)"
,
((
fci
->
pointer_count
==
1
)
?
"pointer"
:
"pointer to a pointer"
),
((
fci
->
pointer_count
+
aflag
==
1
)
?
"pointer"
:
"pointer to a pointer"
),
arg_num
);
warning
(
message
);
}
...
...
@@ -1504,7 +1507,7 @@ check_format_info (info, params)
}
/* Check the type of the "real" argument, if there's a type we want. */
if
(
i
==
fci
->
pointer_count
&&
wanted_type
!=
0
if
(
i
==
fci
->
pointer_count
+
aflag
&&
wanted_type
!=
0
&&
TREE_CODE
(
cur_type
)
!=
ERROR_MARK
&&
wanted_type
!=
TYPE_MAIN_VARIANT
(
cur_type
)
/* If we want `void *', allow any pointer type.
...
...
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