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
2314fb70
Commit
2314fb70
authored
Sep 19, 1994
by
Charles Hannum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add format checking for `q' (quad) modifier.
From-SVN: r8093
parent
9dd53f1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
22 deletions
+29
-22
gcc/c-common.c
+29
-22
No files found.
gcc/c-common.c
View file @
2314fb70
...
...
@@ -483,9 +483,11 @@ found_attr:;
#define T_I &integer_type_node
#define T_L &long_integer_type_node
#define T_LL &long_long_integer_type_node
#define T_S &short_integer_type_node
#define T_UI &unsigned_type_node
#define T_UL &long_unsigned_type_node
#define T_ULL &long_long_unsigned_type_node
#define T_US &short_unsigned_type_node
#define T_F &float_type_node
#define T_D &double_type_node
...
...
@@ -506,6 +508,9 @@ typedef struct {
/* Type of argument if length modifier `l' is used.
If NULL, then this modifier is not allowed. */
tree
*
llen
;
/* Type of argument if length modifier `q' is used.
If NULL, then this modifier is not allowed. */
tree
*
qlen
;
/* Type of argument if length modifier `L' is used.
If NULL, then this modifier is not allowed. */
tree
*
bigllen
;
...
...
@@ -514,32 +519,32 @@ typedef struct {
}
format_char_info
;
static
format_char_info
print_char_table
[]
=
{
{
"di"
,
0
,
T_I
,
T_I
,
T_L
,
NULL
,
"-wp0 +"
},
{
"oxX"
,
0
,
T_UI
,
T_UI
,
T_UL
,
NULL
,
"-wp0#"
},
{
"u"
,
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ULL
,
"-w"
},
{
"n"
,
1
,
T_I
,
T_S
,
T_L
,
T_LL
,
NULL
,
""
},
{
NULL
}
};
static
format_char_info
scan_char_table
[]
=
{
{
"di"
,
1
,
T_I
,
T_S
,
T_L
,
NULL
,
"*"
},
{
"ouxX"
,
1
,
T_UI
,
T_US
,
T_UL
,
NULL
,
"*"
},
{
"efgEG"
,
1
,
T_F
,
NULL
,
T_D
,
T_LD
,
"*"
},
{
"sc"
,
1
,
T_C
,
NULL
,
T_W
,
NULL
,
"*a"
},
{
"["
,
1
,
T_C
,
NULL
,
NULL
,
NULL
,
"*a"
},
{
"C"
,
1
,
T_W
,
NULL
,
NULL
,
NULL
,
"*"
},
{
"S"
,
1
,
T_W
,
NULL
,
NULL
,
NULL
,
"*"
},
{
"p"
,
2
,
T_V
,
NULL
,
NULL
,
NULL
,
"*"
},
{
"n"
,
1
,
T_I
,
T_S
,
T_L
,
NULL
,
""
},
{
"di"
,
1
,
T_I
,
T_S
,
T_L
,
T_LL
,
NULL
,
"*"
},
{
"ouxX"
,
1
,
T_UI
,
T_US
,
T_UL
,
T_ULL
,
NULL
,
"*"
},
{
"efgEG"
,
1
,
T_F
,
NULL
,
T_D
,
NULL
,
T_LD
,
"*"
},
{
"sc"
,
1
,
T_C
,
NULL
,
T_W
,
NULL
,
NULL
,
"*a"
},
{
"["
,
1
,
T_C
,
NULL
,
NULL
,
NULL
,
NULL
,
"*a"
},
{
"C"
,
1
,
T_W
,
NULL
,
NULL
,
NULL
,
NULL
,
"*"
},
{
"S"
,
1
,
T_W
,
NULL
,
NULL
,
NULL
,
NULL
,
"*"
},
{
"p"
,
2
,
T_V
,
NULL
,
NULL
,
NULL
,
NULL
,
"*"
},
{
"n"
,
1
,
T_I
,
T_S
,
T_L
,
T_LL
,
NULL
,
""
},
{
NULL
}
};
...
...
@@ -885,7 +890,8 @@ check_format_info (info, params)
}
}
}
if
(
*
format_chars
==
'h'
||
*
format_chars
==
'l'
||
*
format_chars
==
'L'
)
if
(
*
format_chars
==
'h'
||
*
format_chars
==
'l'
||
*
format_chars
==
'q'
||
*
format_chars
==
'L'
)
length_char
=
*
format_chars
++
;
else
length_char
=
0
;
...
...
@@ -994,6 +1000,7 @@ check_format_info (info, params)
default
:
wanted_type
=
fci
->
nolen
?
*
(
fci
->
nolen
)
:
0
;
break
;
case
'h'
:
wanted_type
=
fci
->
hlen
?
*
(
fci
->
hlen
)
:
0
;
break
;
case
'l'
:
wanted_type
=
fci
->
llen
?
*
(
fci
->
llen
)
:
0
;
break
;
case
'q'
:
wanted_type
=
fci
->
qlen
?
*
(
fci
->
qlen
)
:
0
;
break
;
case
'L'
:
wanted_type
=
fci
->
bigllen
?
*
(
fci
->
bigllen
)
:
0
;
break
;
}
if
(
wanted_type
==
0
)
...
...
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