Fumeur wrote:
> Is the following program standard conform?
> (reduced as much as possible so it still shows the problem)
>
> /* begin */
> #include <stdio.h>
>
> void xfprintf(FILE *);
>
> void xfprintf(FILE *f) {
> fprintf(f, "x\n");
> }
>
> int main(void) {
> xfprintf(stderr);
> return 0;
> }
> /* end */
>
>
> It compiles with gcc without warnings and works correctly, but trying
> to compile it with a particular other popular compiler, it yields the
> following diagnostics:
>
> lc -ansic -A -shadows -unused -O -c xfprintf.c -o xfprintf.obj
> Error xfprintf.c: 4 redefinition of 'xfprintf'
> Error c:\lcc\include\stdio.h: 116 Previous definition of 'xfprintf' here
> 2 errors, 0 warnings
> 1 error
> make: *** [xfprintf.obj] Error 1
>
> Who is at fault here, my program or the compiler?
>
You are using a bad bad compiler. This is unacceptable!
I would ask
1) For a full refund of the money you spent.
*After* you get the money
2) Ask Ossama bin laden to kill that infidel to the principles
and spirit of C.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32