bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] .... illegal C code.....


From: Joerg Schilling
Subject: [Bug-tar] .... illegal C code.....
Date: Wed, 22 Dec 2004 14:31:07 +0100
User-agent: nail 11.2 8/15/04

This is a second try, the first mail did not arrive.


cc -DHAVE_CONFIG_H -DLIBDIR=\"/usr/local/lib\" -I. -I. -I..    
-I/usr/local/include  -g -c argp-parse.c
"argp-parse.c", line 485: warning: pointer to void or function used in 
arithmetic
"argp-parse.c", line 486: warning: pointer to void or function used in 
arithmetic
"argp-parse.c", line 486: warning: pointer to void or function used in 
arithmetic
"argp-parse.c", line 487: warning: pointer to void or function used in 
arithmetic
"argp-parse.c", line 487: warning: pointer to void or function used in 
arithmetic
"argp-parse.c", line 487: warning: pointer to void or function used in 
arithmetic

A void pointer points to an object of _unknown_ size, therefore
a C-compiler needs to multiply with an unknown value...

Note that this is really more than a warning. It is a _hard_ C-violation.
If Sun-cc would not not implement GCC bugs for your convenience, compilation
would abort here.


cc -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../ -I../lib   -I/usr/local/include  
-g -c rmt.c
"rmt.c", line 288: warning: argument #2 is incompatible with prototype:
        prototype: pointer to pointer to char : "../lib/getopt.h", line 209
        argument : pointer to const pointer to char

It makes sense to write code in a way that the compiler does not give warnings
with warnings disabled (as in this case).

Jörg

-- 
 EMail:address@hidden (home) Jörg Schilling D-13353 Berlin
       address@hidden           (uni)  If you don't have iso-8859-1
       address@hidden   (work) chars I am J"org Schilling
 URL:  http://www.fokus.fraunhofer.de/usr/schilling 
ftp://ftp.berlios.de/pub/schily




reply via email to

[Prev in Thread] Current Thread [Next in Thread]