Re: __attribute__((optimize("-O2"))) doesn't work

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

 



On Mon, 2014-12-22 at 15:43 -0600, Chaoran Yang wrote:
> I’ve tried __attribute__((optimize(“O2”))) and __attribute__((optimize((2))). All didn’t work.

What do you expect to be optimized away in your example function?

int foo() __attribute__((optimize("O2")));
int foo()
{
  return 2;
}

Cheers,
Oleg




[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