Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Gary Oberbrunner
Mon, 14 Sep 1992 20:41
Any use of stdarg causes compiler warnings with -Wcast-align
Author: Gary Oberbrunner
Date: Mon, 14 Sep 1992 20:41
Date: Mon, 14 Sep 1992 20:41
33 lines
1345 bytes
1345 bytes
When I use stdarg in a program and compile it with gcc 2.2.2 on my Sun4c
running 4.1.2, I get these warnings:
draw_func.c:107: warning: cast increases required alignment of target type
draw_func.c:107: warning: cast increases required alignment of target type
Two per line on which "va_arg" appears.
Test prog:
#include <stdarg.h>
int main(int a, ...)
{
va_list va;
int foo;
va_start(va, a);
foo = va_arg(va,int);
return 0;
}
Compile like this:
% gcc -c -Wcast-align foo.c
foo.c:7: warning: cast increases required alignment of target type
foo.c:7: warning: cast increases required alignment of target type
%
I presume this is a problem with the implementation of the va_arg macro.
- Gary Oberbrunner
Thinking Machines Corporation
245 First St
Cambridge, MA 02142
garyo@think.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads