9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] drawterm + gcc + Solaris
@ 2002-03-12 14:36 Ish Rattan
  2002-03-13 10:05 ` Douglas A. Gwyn
  0 siblings, 1 reply; 2+ messages in thread
From: Ish Rattan @ 2002-03-12 14:36 UTC (permalink / raw)
  To: 9fans


System is SunBlade-100 running Solaris-8.

I tried gcc-3.0.3 (64-bit) to compile drawterm. I saw the error message
shown below. The line in question is
	rune = va_arg(*arg, Rune);
relacing Rune by int does result in successful compilation BUT
drawterm crashes (signal 11). It did compile gcc-2.95.3 (32-bit) compiler
and works.

-ishwar

---
/local/home/ishwar/drawterm/doprint.c: In function `numbconv':
/local/home/ishwar/drawterm/doprint.c:312: warning: cast from pointer to integer of different size
/local/home/ishwar/drawterm/doprint.c: In function `cconv':
/local/home/ishwar/drawterm/doprint.c:530: `Rune' is promoted to `int' when passed through `...'
/local/home/ishwar/drawterm/doprint.c:530: (so you should pass `int' not `Rune' to `va_arg')
mk: gcc -g -c ...  : exit status=exit(1)
---



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

* Re: [9fans] drawterm + gcc + Solaris
  2002-03-12 14:36 [9fans] drawterm + gcc + Solaris Ish Rattan
@ 2002-03-13 10:05 ` Douglas A. Gwyn
  0 siblings, 0 replies; 2+ messages in thread
From: Douglas A. Gwyn @ 2002-03-13 10:05 UTC (permalink / raw)
  To: 9fans

Ish Rattan wrote:
> I tried gcc-3.0.3 (64-bit) to compile drawterm. I saw the error message
> shown below. The line in question is
>         rune = va_arg(*arg, Rune);
> relacing Rune by int does result in successful compilation BUT
> drawterm crashes (signal 11). It did compile gcc-2.95.3 (32-bit) compiler
> and works.

I don't have enough information to be sure, but my *guess* is that
the variadic-argument function interface changed between release 2.x
and 3.0 of GCC, and whatever support you're using for it wan't done
right.  Make sure the prototypes for such functions are always in
scope, using the ,...) notation, and that the right implementation
of <stdarg.h> is being used for the va_* interface definition.


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

end of thread, other threads:[~2002-03-13 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-12 14:36 [9fans] drawterm + gcc + Solaris Ish Rattan
2002-03-13 10:05 ` Douglas A. Gwyn

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 NNTP newsgroup(s).