Rainer Orth <[email protected]> wrote:
> [email protected] (Joerg Schilling) writes:
>
> > The problem with GCC-4.4 is that it cannot be called ANSI C compliant.
> > I did e.g. not jet find a way to prevent a warning for this line:
> >
> > (void)write(1, "Test" 4);
> >
> > which is 100% correct and even marks the return value as out of interest
> > but this fact is ignored by gcc.
>
> I don't get any warning whatsoever:
It may be that they fixed the problem, it happens with gcc-4.3.3:
#define eprints(a) (void)write(STDERR_FILENO, (a), sizeof (a)-1)
...
eprints("Condition not caught: ");
MAKEFLAGS value: '-d'
Make: Dnull is out of date to: OBJ/i686-linux-cc
...echo > OBJ/i686-linux-cc/Dnull
.OBJDIR : OBJ/i686-linux-cc
.OBJSEARCH : all
.SEARCHLIST : . OBJ/i686-linux-cc stdio OBJ/i686-linux-cc
DTarget: all
Default: raisecond.o is out of date to: ../incs/i686-linux-cc/xconfig.h
...echo " ==> COMPILING \"raisecond.o\""; gcc -Wall
-Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wstrict-prototypes -O
-DSCHILY_BUILD -IOBJ/i686-lin
ux-cc -I../incs/i686-linux-cc -I../include -I/usr/src/linux/include
-D_GNU_SOURCE -Istdio -DUSE_SCANSTACK -DPORT_ONLY -c -o
OBJ/i686-linux-cc/raisecond.o
raisecond.c
==> COMPILING "raisecond.o"
raisecond.c: In function 'raiseabort':
raisecond.c:159: warning: ignoring return value of 'write', declared with
attribute warn_unused_result
Jörg
--
EMail:[email protected] (home) Jörg Schilling D-13353 Berlin
[email protected] (uni)
[email protected] (work) Blog:
http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code