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
3c01f863
Commit
3c01f863
authored
Apr 06, 1993
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(va_arg): Cast argument pointer to (char *).
From-SVN: r4039
parent
39ab948e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
gcc/ginclude/va-sparc.h
+7
-6
No files found.
gcc/ginclude/va-sparc.h
View file @
3c01f863
...
...
@@ -64,21 +64,22 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
/* We don't declare the union member `d' to have type TYPE
because that would lose in C++ if TYPE has a constructor. */
/* We cast to void * and then to TYPE * because this avoids
a warning about increasing the alignment requirement. */
a warning about increasing the alignment requirement.
The casts to char * avoid warnings about invalid pointer arithmetic. */
#define va_arg(pvar,TYPE) \
__extension__ \
({ TYPE __va_temp; \
((__builtin_classify_type (__va_temp) >= 12) \
? ((pvar)
+= __va_rounded_size (TYPE *),
\
**(TYPE **) (void *) ((pvar) - __va_rounded_size (TYPE *))) \
? ((pvar)
= (char *)(pvar) + __va_rounded_size (TYPE *),
\
**(TYPE **) (void *) ((
char *)(
pvar) - __va_rounded_size (TYPE *))) \
: __va_rounded_size (TYPE) == 8 \
? ({ union {char __d[sizeof (TYPE)]; int __i[2];} __u; \
__u.__i[0] = ((int *) (void *) (pvar))[0]; \
__u.__i[1] = ((int *) (void *) (pvar))[1]; \
(pvar)
+= 8;
\
(pvar)
= (char *)(pvar) + 8;
\
*(TYPE *) (void *) __u.__d; }) \
: ((pvar)
+= __va_rounded_size (TYPE),
\
*((TYPE *) (void *) ((pvar) - __va_rounded_size (TYPE)))));})
: ((pvar)
= (char *)(pvar) + __va_rounded_size (TYPE),
\
*((TYPE *) (void *) ((
char *)(
pvar) - __va_rounded_size (TYPE)))));})
#endif
/* defined (_STDARG_H) || defined (_VARARGS_H) */
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