Subject: compile mystery
To: None <netbsd-help@netbsd.org>
From: Antti Kantee <pooka@iki.fi>
List: netbsd-help
Date: 07/26/1999 02:13:10
(Well this is actually not entirely NetBSD-related, but very close
anyhow.. ;)

I am wondering why this happens with the following code:
#include <stdlib.h>
void nada   __P((char));
void
nada(siuh) char siuh; {}

babylon5:11:~/src/omat> cc -Wall -ansi -pedantic -c mystery.c
mystery.c: In function `nada':
mystery.c:4: warning: promoted argument `siuh' doesn't match prototype
mystery.c:2: warning: prototype declaration

If ``siuh'' is an int the code compiles fine. If I write void nada(char
siuh) the code compiles fine. Can anyone shed some light?

-- 
  "Never underestimate the power of the Lite side of the \Source/"
 Antti Kantee   /       NetBSD        \  1973 <- draken   \    / o
<pooka@iki.fi> / http://www.netbsd.org \  platters -> 1999 \  /  |
______________/ Free Multiplatform UN*X \___________________\/__ |