bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: too many warnings from Bison CVS for Pike


From: Joel E. Denny
Subject: Re: too many warnings from Bison CVS for Pike
Date: Mon, 30 Jan 2006 15:34:49 -0500 (EST)

On Mon, 30 Jan 2006, Hans Aberg wrote:

> Instead, the C parser was for some time unofficially written so that some
> could compile it using a C++ compiler. But then C++ added namespaces, which in
> combination with other things (like the need for invoking the copy
> constructors during a parser stack extension), made it difficult to maintain.
> So this idea of being able compile the C parser as C++ was dropped, though
> some projects are using it (perhaps LilyPond is one).

Thanks for that information. I'd be interested to know what C++ features 
are no longer supported.

Fortunately for my work, support for compiling C as C++ has not been 
dropped entirely, or perhaps it's just been reinstated unofficially.  For 
example, make maintainer-check runs all test cases with a C++ compiler.  
Also, in recent months, I've seen effort to cast the return of malloc 
because C++ doesn't allow assigning a void* to a non-void* type.  On the 
other hand, this cast is actually considered by some to be bad style in C: 
if you forget to #include the prototype for malloc, the cast prevents the 
compiler from warning you that the assumed int return type of malloc is 
unreasonable.

Joel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]