delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/04/22/00:51:28

Date: Wed, 22 Apr 1992 00:20:00 -0400
From: Stephen Hite <shite AT sinkhole DOT unf DOT edu>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Pre-processor bug (?)
Status: O

>The compiler could deal with this, but this is not correct code
>according to ANSI C, and this is why the compiler is giving you the
>error.  Apparently BC++ 2.0 works around this coding error without
>telling you about it.
>
>Moral: don't mix old-style function declaration with new-style
>function prototypes.
--
>				Eric Backus

  I just wanted to add that Jim Roskind's C and C++ grammars will allow
you to mix old style function declaration and new style function prototyping.  
I believe his reasoning behind doing this was that it would 
allow C/C++ code tools to extract the declaration information from old 
style code.

  Personally, I find the new style harder to read when the function 
header declaration is > 1 line.   I like the new style when it's a 
one-liner, but I like the old style when I have to go to > 1 line.
Even though workstation screens are getting larger, I still try to keep
to an 80 column limit on the bigger screens.  


P.S. The pointer to Jim Roskind's C/C++ grammars are in the comp.lang.c++
     FAQ (which lives at sun.soe.clarkson.edu in the pub/C++ hierarchy).


Steve Hite
shite AT sinkhole DOT unf DOT edu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019