This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ANSIfy cp/parser.c


"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:

|  > From: Gabriel Dos Reis <gdr@integrable-solutions.net>
|  > 
|  > "Joseph S. Myers" <jsm28@cam.ac.uk> writes:
|  > 
|  > | On Thu, 9 Jan 2003, Kaveh R. Ghazi wrote:
|  > | 
|  > | > Perhaps automake can help?  Does anyone think adding automake
|  > | > conversion of the gcc dir and ansi2knr as two new beginner projects is
|  > | > worthwhile?
|  > | 
|  > | ansi2knr is not a sensible road.  The benefits of using ISO C go beyond
|  > | the trivial syntax changes in function declarations and definitions and
|  > | keeping things limited so a converter can work is a bad idea.
|  > 
|  > Yeah, my "conversion" went behond mere prototyping: I made some
|  > functions use and return "bool" where appropriate.
|  > -- Gaby
| 
| Note using "bool" (i.e. char) in a prototype is a GCC extension,

Yes, I'm well aware of that.  We started using bool long before we
started ansifying function prototypes.

| not
| ISO C, and -pedantic will spank you for it.  So "bool" should never be
| allowed in the core compiler (well, not until GCC crushes all
| competitors. :-)

It depends on what you call "core compiler".  For example, it is safe
if prototypes are seen before actual use -- which is the case in the
other front-ends.  

It is an error in K&R mode.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]