> yeah, if it were in one of those books it could be added to the -weff-c+
> + option. It doesn't seem sensible to add a different option for an
> alternative (set of?) coding rule(s).
FYI this is item 13 in MEC++.
I think this would be a good error to have. My suggestion is to file an
enhancement request in gcc bugzilla, with this code:
#include <stdexcept>
void
foo()
{
try
{
}
catch (std::logic_error e)
{
}
}
saying that with -Weffc++, you want a warning. Include a link back to
this thread, so that who-ever works on this can read the initial
reaction and the suggestion by Nathan to hook into finish_handler_parms.
In the near past, Giovanni has done a good job of enhancing the More
Effective C++ rules. If you ask nicely, maybe he'd do the same for this.
best,
benjamin