No warning for no-op / no-ops / noop / noops / statements without effect?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi;

  How do you get no-ops to trigger a warning? Eg this:

void noop()
{
   int i = 6;
   i |= 0;

   int j = 5;
   j += 0;

   int k = 3;
   k = k;
}

> g++ -pedantic -Wall -Wextra -O3 -c noops.cpp
>

compiles without complaint. Am I just missing a flag? (4.1.x, 4.4.x, 4.6)
Thanks.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux