This is the mail archive of the gcc-bugs@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]

Re: compilation problem with g++ when volatile is used


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

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