This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc-20010305 IRIX 5.3 bug report
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc-20010305 IRIX 5.3 bug report
- From: wem at bruker dot de (Werner Mausshardt)
- Date: Wed, 7 Mar 2001 16:27:08 +0100 (MEZ)
- Reply-To: werner dot mausshardt at bruker dot de
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;
}