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: Hans Aberg
Subject: Re: too many warnings from Bison CVS for Pike
Date: Mon, 30 Jan 2006 22:30:15 +0100

On 30 Jan 2006, at 21:34, Joel E. Denny wrote:

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

It's easier to answer what is supported: none, as far as compile C as C++. There is some C++ skeleton, using C++ containers, in the work by Akim Demaille, and some may already using it.

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.

It is Paul Eggert that is doing the C skeleton, and I doubt he does anything with C++ in mind. Note that the C parser stack does not invoke copy constructors when extending. And a strict C++ compiler will complain when using names such as "malloc", as the C++ name is "std::malloc". Is your C++ compiler old?

  Hans Aberg






reply via email to

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