This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29834] g++ thinks it is a declaration when it cannot be
- From: "ace.of.zerosync at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 13 Jul 2013 01:51:39 +0000
- Subject: [Bug c++/29834] g++ thinks it is a declaration when it cannot be
- Auto-submitted: auto-generated
- References: <bug-29834-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29834
--- Comment #13 from M.S. Babaei <ace.of.zerosync at gmail dot com> ---
(In reply to James Kanze from comment #9)
> Re using the init list syntax: it won't work if you have to be compatible
> with other compilers (like Sun CC). Using something like (Doh (x)), ++x
> seems to be the most portable work-around.
Sorry, I didn't get your answer at first sight. Actually your elegant
workaround is the most portable way. And, works on all compilers, too. Even
pre-C++11 era compilers.
Thanks.