Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!mailrus!ames!elroy!peregrine!zardoz!dhw68k!Rick 'Transputer' Stein From: Rick 'Transputer' Stein@dhw68k.cts.com (Rick 'Transputer' Stein) Newsgroups: comp.lang.c Subject: Undeclared function arguments Message-ID: <13168@dhw68k.cts.com> Date: 13 Oct 88 17:48:31 GMT Reply-To: Rick@dhw68k.cts.com () Distribution: na Organization: Wolfskill residence; Anaheim, CA (USA) Lines: 30 I wonder if any of you gurus can comment on the following fragment of code output from lex: The function yyback has two arguments, but only one is typed in argument the list. Why does my C compiler or lint, for that matter, not complain? yyback(p,m) int *p; { if (p==0)return(0); while(*p) { if ( *p++ == 0 )return(1); } return(0); } I've compiled this fragment along with the body of lex.yy.c on many machines and compilers (SGI/4D, HP9000, SUN/4, Inmos transputers with 3L,MSC 4.0, etc) and no errors have been generated. Are undeclared function arguments auto casted to pointers? Thanks in advance. +--------------------------+---------------------------------------+ | Rick 'Transputer' Stein | uucp: ...{felix, zardoz}!dhw68k!stein | | "Goddam digital confuser | MaBellnet: 714-786-7794 (H) | | technology..." | 714-540-8900 (W) | | Disclaimer: These opinions are mine, not my employer's. | +--------------------------+-------------------------------------- +