[cfe-dev] clang and -Wframe-larger-than
bogorodskiy at gmail.com
Fri May 8 21:40:08 PDT 2015
I have a question regarding -Wframe-larger-than in clang. I'm building a
project (libvirt git version) that uses this flag. The system I build on
is FreeBSD 11.0-CURRENT amd64.
Build fails with:
virshtest.c:253:1: error: stack frame size of 5512 bytes in function
This happens with:
FreeBSD clang version 3.6.0 (tags/RELEASE_360/final 230434) 20150225
I have tried some other versions as well and figured out that this one
also triggers the same error:
clang version 3.5.2 (tags/RELEASE_352/final)
However, this one works fine:
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
I've also tried gcc:
gcc version 5.1.0 (FreeBSD Ports Collection)
And it also works fine.
Is that an intentional behavior that the newer clang versions (>=3.5)
generate a code with a larget stack frame size?
PS I'm not posting a complete CFLAGS line used in the project as it's
quite huge. Specific value for -Wframe-larger-than used is 4096. Please
let me know if some other information is needed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 473 bytes
Desc: not available
More information about the cfe-dev