Hi,
I'm using g++ 4.1.1 under Fedora Core 5 in an X86 system.
I read the GCC manual and it says -Wall includes the -Wswitch-enum
and -Wswitch-default warnings. But I had to supply these command
line options explicitly before the warnings are generated. Is the
manual wrong or is there a bug in g
> Therefore, only -Wswitch is enabled by -Wall but neither of
> Wswitch-default or Wswitch-enum are.
The statement for -Wall says:
-Wall
All of the above `-W' options combined. This enables all the warnings about
constructions that some users consider questionable, and that are easy to avoi
Hi all,
I'm using g++ 4.1.1 under Fedora Core 5 on an Intel system. I'm
compiling
the following code with "g++ -Wextra tst.cpp".
enum my_enum { FOO = 10, BAR, BAZ };
int
main()
{
my_enum e = BAR;
while (e == 15);
for (;e == 15;);
Hi,
I was wondering if there's an option to gcc/g++ to make it generate a
warning/error when an assignment is used as a truth value in an
expression.
The -Wall option does this. But it can be silenced with parentheses.
The problem is, macros often use parentheses around expressions. Thus,
this w
Hi,
I have the following code:
namespace X
{
namespace Y
{
namespace Z
{
struct A { typedef int int_t; };
struct Z { typedef int int_t; };
}
}
}
using namespace X::Y::Z;
int
main()
{
Z::A::int_t i = 0;
Z::Z::int_t j = 0;
return i == j;
}
I used the comma
> > namespace X
> > {
> > namespace Y
> > {
> > namespace Z
> > {
> > struct A { typedef int int_t; };
> > struct Z { typedef int int_t; }; } } }
> >
> > using namespace X::Y::Z;
> >
> > int
> > main()
> > {
> > Z::A::int_t i = 0;
> > Z::Z::int_t j = 0;
> > r