This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc-20010305 IRIX 5.3 bug report



with snapshot gcc-20010305 on IRIX 5.3 the appended code
(in file otto143.c) compiled with: c++ -O2 -Wall -c otto143.c

results in the error message:

otto143.c: In function `void errmes(const char*, ...)':
otto143.c:13: cannot convert `void*' to `char*' for argument `3' to `int 
   vsprintf(char*, const char*, char*)'


the problem does not occur with gcc (instead of c++) and does
also not (!) occur with the IRIX 6.5 build of snapshot gcc-20010305
(compiles without warnings).

-- 
Werner Mausshardt		E-mail: werner.mausshardt@bruker.de
Software Department		Tel: +49 721 5161 448
Bruker Analytik GmbH		Fax: +49 721 5161 480


#include <stdio.h>
#include <stdarg.h>

void errmes(const char* format, ...)
{
  va_list ap;
  char erm_buf[1024];

  va_start(ap, format);
  (void)vsprintf(erm_buf, format, ap);
  va_end(ap);
  return;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]