[xpressive] un-used variables

We compile our app with -Wunused-variables on the Mac with gcc 4.0. We
get several unused variable warnings due to

Jeff Flinn wrote:
We compile our app with -Wunused-variables on the Mac with gcc 4.0. We get several unused variable warnings due to
. Is there some facility for quieting these from xpressive itself? We currently are using #pragma unused ( eol, ...) to quiet the list of about 15 unused variables.
Are you using the version of xpressive in 1.34, or in the latest .zip archive from the Boost file vault? In the latest code, I have tried to stifle these warnings by adding the following to regex_primitives.hpp: namespace detail { inline void ignore_unused_regex_primitives() { ignore_unused(repeat_max); ignore_unused(inf); ignore_unused(epsilon); ... ignore_unused(keep); } } where ignore_unused() is merely: template<typename T> void ignore_unused(T const &) { } That seems to work for me. You might try something similar. -- Eric Niebler Boost Consulting www.boost-consulting.com

hi eric, Eric Niebler wrote:
Jeff Flinn wrote:
We compile our app with -Wunused-variables on the Mac with gcc 4.0. We get several unused variable warnings due to
. Is there some facility for quieting these from xpressive itself? We currently are using #pragma unused ( eol, ...) to quiet the list of about 15 unused variables.
Are you using the version of xpressive in 1.34, or in the latest .zip
We're using 1.34.1.
archive from the Boost file vault? In the latest code, I have tried to stifle these warnings by adding the following to regex_primitives.hpp:
namespace detail { inline void ignore_unused_regex_primitives() { ignore_unused(repeat_max); ignore_unused(inf); ignore_unused(epsilon); ... ignore_unused(keep); } }
where ignore_unused() is merely:
template<typename T> void ignore_unused(T const &) { }
That seems to work for me. You might try something similar.
Aah, that looks like the trick. Will this make it into 1.35? Thanks, Jeff Flinn

Jeff Flinn wrote:
hi eric,
Eric Niebler wrote:
In the latest code, I have tried to stifle these warnings by adding the following to regex_primitives.hpp: <snip>
Aah, that looks like the trick. Will this make it into 1.35?
I hope so. It's ultimately the release manager's call whether the new xpressive makes it into 1.35, but xpressive is passing its tests on the release platforms so it looks good. If you don't want to wait, you could grab the latest xpressive.zip from the file vault now and use that. It works with 1.34.1. -- Eric Niebler Boost Consulting www.boost-consulting.com

Eric Niebler wrote:
Jeff Flinn wrote:
hi eric,
Eric Niebler wrote:
In the latest code, I have tried to stifle these warnings by adding the following to regex_primitives.hpp: <snip> Aah, that looks like the trick. Will this make it into 1.35?
I hope so. It's ultimately the release manager's call whether the new xpressive makes it into 1.35, but xpressive is passing its tests on the release platforms so it looks good.
Hopefully that will be the case.
If you don't want to wait, you could grab the latest xpressive.zip from the file vault now and use that. It works with 1.34.1.
I copied what you had in the cvs into our copy under version control, so worse case, I'll move these into 1.35 when we get it. Thanks for the help,\ Jeff Flinn
participants (2)
-
Eric Niebler
-
Jeff Flinn