Boost Users :
From: David Abrahams (dave_at_[hidden])
Date: 2005-06-30 07:30:29
Dave Steffen <dgsteffen_at_[hidden]> writes:
> I claim that our macros and use thereof is A) correct and B) safe.
> It just so happens that these macro constructs occasionally expand to
> something that has an extra semicolon, which triggers a warning in
> GCC 3.4 that we haven't seen before.
The warning will be an error on other compilers. The semicolons
aren't just "bad style;" they're illegal.
> What I'm asking is this: assuming that our macros and useage
> thereof is correct,
Well, it's not correct if you expect those semicolons to be usable
> how do we
> A) silence the GCC warning about extra semicolons, or
I wouldn't count on there being a way.
> B) modify the construct so that the trailing semicolon is
> "legal", or at least "something that won't scare the
I suggest you use Emacs or some other programmable editor and teach
its indentation mode about your macros if automatic indentation is
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net