(void)ing unreferenced parameters

Nathan Sidwell nathan@acm.org
Fri Jun 18 03:20:00 GMT 1999


Martin Dorey wrote:
> 
> I can't find in the standard why this program should give:
> 
> GNU C++ version gcc-2.96 19990602 (experimental) (i960-ashos-elf)
> compiled by GNU C version egcs-2.93.12 19990318 (gcc2 ss-980929
> experimental).
> (void)ing unreferenced parameters.cpp: In function `void monk(const A
> &)':
> (void)ing unreferenced parameters.cpp:6: invalid use of undefined type
> `const class A'
> (void)ing unreferenced parameters.cpp:2: forward declaration of `const
> class A'
Please see yesterday's bug report/discussion/patch thread

http://egcs.cygnus.com/ml/egcs-bugs/1999-06/msg00468.html
http://egcs.cygnus.com/ml/egcs-patches/1999-06/msg00411.html

to be brief, the code is legal, but egcs is overzealous about dealing with
volatile objects and C and C++ differ in a surprising way.

Why is it that bugs which lie dormant for months suddenly pop out all over the
place?

nathan

-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
        I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk


More information about the Gcc-bugs mailing list