This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: compilation problem with g++ when volatile is used
- To: Ooi Boon Pin <bpooi at gintic dot gov dot sg>, gcc-bugs at gcc dot gnu dot org
- Subject: Re: compilation problem with g++ when volatile is used
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Fri, 25 Feb 2000 09:34:43 +0000
- Organization: CodeSourcery, LLC
- References: <01570E7F8223D2119C9A00805F9A267C01BD5A2D@gexchange.gintic.gov.sg>
Ooi Boon Pin wrote:
> Thanks for your prompt reply. Just want to clarify one more thing. I did not
> have this compilation problem with version 2.7 of g++. So, is this a new
> rule that being integrated to the latest compiler? Is there any way to
> workaround this problem without changing the codes? Please advise. Your help
> will be very much appreciated.
I can't recall if this is a new C++ rule, or one which was always there, but
newly implemented. -fpermissive might help. However, that is only a stop-gap,
the code you give is not C++. See http://gcc.gnu.org/bugs.html#known, particularly,
'In particular, bugs caused by invalid C++ code have a simple work-around,
fix the code. Now that there is an agreed ISO/ANSI standard for C++, the
compiler has a definitive document to adhere to. Earlier versions might have
accepted source code that is no longer C++. This means that code
which might have `worked' in a previous version, is now rejected. You should
update your code to be C++. '
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org