Boost logo

Boost Users :

From: Dave Steffen (dgsteffen_at_[hidden])
Date: 2005-06-29 09:57:51

Hi folks,

Tried to compile our code with GCC 3.4 last night; our default is to
always keep the warning levels turned all the way up.

I'm getting many errors of the "extra `;'" type, as the result of
various preprocessor metaprogramming constructs.

Specifically, if a macro expands to a function definition (silly example):

#define FOO(T) \
inline T FOO(T i) { ... }


The semicolons after the macro invocations give GCC 3.4 fits; but
without the semicolons, it looks strange, editors can't indent, etc.

Is anyone aware of a way to silence the "extra ;" errors? (I've
looked through their docs, can't find anything; I suspect other Boost
users have run across this.) Is there something I'm missing in the
preprocessor library that handles this sort of thing?

Any help appreciated! Thanks!

Dave Steffen, Ph.D. "There are two ways to write error-free
Software Engineer IV programs; only the third one works."
Numerica Corporation
ph (970) 419-8343 x27 "Pie are not square. Pie are round.
fax (970) 223-6797 Cornbread are square"
dgsteffen_at_[hidden] ... anon (usenet)

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at