public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GNU gcc 3.4.6 Compile Error on Solaris 10
@ 2007-06-06 15:50 Bruce Butler
  2007-06-06 17:03 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Butler @ 2007-06-06 15:50 UTC (permalink / raw)
  To: gcc-help

Compiling using gcc 3.4.6 on Solaris 10 with the following command line options:

 

-ansi -Wall -g -DAUX -D_SYSV_SOURCE -D_BSD_SOURCE -D_AUX_SOURCE -DNOSTDHDRS -DSUN 

 

I am getting the following error: "'va_start' used in function with fixed args"

 

Can anyone help me with this?

 

Example:

 

void do_remarks_process( id, sec_str, va_alist )
 int id;
 char *sec_str;
 char *va_alist;
{
 static char label_str[] = {"LABEL/"};
 static char labelid_str[] = {"LABELID/"};
 char *ptr = label_str;
 va_list set_args;

   if ( id )   ptr = labelid_str;

   if ( ok_to_process_msg  &&  ok_to_process_uic  &&  (!ok_to_process_rmk)  &&
        (!secur_sclass_flag) )
      if ( strncmp(message_record[l_indx+1]+HEAD_LEN, ptr, strlen(ptr)) == 0 )
         new_error("LABEL", 40);

   while ( strncmp(message_record[l_indx+1]+HEAD_LEN, ptr, strlen(ptr)) == 0 )
      {
       l_indx++;
       va_start(set_args, va_alist);     ß/* #######  causes error */
       label_set_edits(id,sec_str, set_args);
       va_end( set_args );
      }
}

 

regards,

Bruce



______________________________________________________________________
This email was scanned by MessageLabs
_____________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GNU gcc 3.4.6 Compile Error on Solaris 10
  2007-06-06 15:50 GNU gcc 3.4.6 Compile Error on Solaris 10 Bruce Butler
@ 2007-06-06 17:03 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2007-06-06 17:03 UTC (permalink / raw)
  To: Bruce Butler; +Cc: gcc-help

"Bruce Butler" <BButler@ABFloyd.com> writes:

> void do_remarks_process( id, sec_str, va_alist )
>  int id;
>  char *sec_str;
>  char *va_alist;

Old style varargs are no longer supported.  In order to use newer
versions of gcc you need to use ISO C style stdarg.  That is,
    void do_remarks_process (int id, char *sec_str, ...)

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-06 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-06 15:50 GNU gcc 3.4.6 Compile Error on Solaris 10 Bruce Butler
2007-06-06 17:03 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).