[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | Alpha Developer Support |
Notice: | [email protected], 800-332-4786 |
Moderator: | HYDRA::SYSTEM |
|
Created: | Mon Jun 06 1994 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3722 |
Total number of notes: | 11359 |
3458.0. "Open Systems Solutions" by HYDRA::AXPDEVELOPER (Alpha Developer support) Wed Apr 09 1997 11:32
Company Name : Open Systems Solutions
Contact Name : Bancroft Scott
Phone : 908-249-5107
Fax :
Email : [email protected]
Date/Time in : 9-APR-1997 10:32:14
Entered by : Geritt Saylor
SPE center : MRO
Category : Unix
OS Version :
System H/W :
Brief Description of Problem:
-----------------------------
Called and sent email:
Hello,
My ASAP program access code 102896.
When compiling the attached which I call simple.c (13 lines long) on DEC
UNIX using the command "cc -nomember_alignment -c simple.c", the following
error condition is generated:
"cc: Error: simple.c, line 33: In this statement, the alignment of
'arg_ptr' is insufficient."
However when compiling without the -nomember_alignment flag, the
compilation is successful!
Do you have a workaround for this problem? I am using DEC UNIX V6.1.
--------------------------------------------------------------------------
Bancroft Scott Toll Free :1-888-OSS-ASN1
Open Systems Solutions, Inc. International:1-609-987-9073
[email protected] Tech Support :1-908-249-5107
http://www.oss.com Fax :1-908-249-4636
#include <stdio.h>
#include <stdarg.h>
void errormsg(int lineNum, char *s, ...)
{
va_list arg_ptr;
char buffer[1024];
va_start(arg_ptr, s);
vsprintf(buffer, s, arg_ptr);
fprintf(stderr,"%s\n",buffer);
}
T.R | Title | User | Personal Name | Date | Lines |
---|
3458.1 | | HYDRA::AXPDEVELOPER | Alpha Developer support | Wed Apr 09 1997 12:09 | 12 |
| I'm not sure what they're attempting to do here, but the command line argument
-nomember_alignment causes a problem for va_start since it is actually a
structure. A quick work around for this would be to bracket the #include
statements with the following #pragmas.
#pragma member_alignment
#pragma nomember_alignment
The compiler won't cough, and this doesn't affect the user's desire to
manipulate their own structures.
Gerrit
|