Wframe-larger-than flag bug

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Wframe-larger-than flag bug

Hans Wennborg via cfe-dev
Hi,

I'm compiling my project with clang version 7.0.0-3.
I added compilation flag frame-larger-than in order to warning using more than 1024 bytes.

clang indeed warning as expected, but when I added -Werror in order to treat the warning as error clang ignore this flag and it stays warning.

the compilation flags include also save-temps=obj, when I remove this flag the warning treated as error.

Does save-temps flag should be related to -Werror or -Wframe-larger-than?

full compilation flags:  
clang++-7 -D_SYS_LINUX_ -D_HOSTSYS_LINUX_ -D_CPU_  -D_SYS64_ -D_DEBUG_ -O2  -Wframe-larger-than=1024 -MD -Wall -save-temps=obj -Wextra -Wshadow -Werror -g -ggdb -fPIC

Thanks,
Ohad

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Wframe-larger-than flag bug

Hans Wennborg via cfe-dev

On Sun, Jan 5, 2020 at 6:45 AM Ohad Alali via cfe-dev <[hidden email]> wrote:
Hi,

I'm compiling my project with clang version 7.0.0-3.
I added compilation flag frame-larger-than in order to warning using more than 1024 bytes.

clang indeed warning as expected, but when I added -Werror in order to treat the warning as error clang ignore this flag and it stays warning.

the compilation flags include also save-temps=obj, when I remove this flag the warning treated as error.

Does save-temps flag should be related to -Werror or -Wframe-larger-than?

full compilation flags:  
clang++-7 -D_SYS_LINUX_ -D_HOSTSYS_LINUX_ -D_CPU_  -D_SYS64_ -D_DEBUG_ -O2  -Wframe-larger-than=1024 -MD -Wall -save-temps=obj -Wextra -Wshadow -Werror -g -ggdb -fPIC

Thanks,
Ohad
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Wframe-larger-than flag bug

Hans Wennborg via cfe-dev
Thanks for your response.
I've opened your link and it's seems that clang (trunk) is not handle the flag -save-temps=obj. compilation with -save-temps: https://godbolt.org/z/-neaMs
When changing the compiler to clang v0.8, same behaviour as describe before.
with flag -save-temps=obj: https://godbolt.org/z/gzpFGD
without flag -save-temps=obj: https://godbolt.org/z/5uABvL

Thanks,
Ohad



‫בתאריך שבת, 25 בינו׳ 2020 ב-8:16 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬

On Sun, Jan 5, 2020 at 6:45 AM Ohad Alali via cfe-dev <[hidden email]> wrote:
Hi,

I'm compiling my project with clang version 7.0.0-3.
I added compilation flag frame-larger-than in order to warning using more than 1024 bytes.

clang indeed warning as expected, but when I added -Werror in order to treat the warning as error clang ignore this flag and it stays warning.

the compilation flags include also save-temps=obj, when I remove this flag the warning treated as error.

Does save-temps flag should be related to -Werror or -Wframe-larger-than?

full compilation flags:  
clang++-7 -D_SYS_LINUX_ -D_HOSTSYS_LINUX_ -D_CPU_  -D_SYS64_ -D_DEBUG_ -O2  -Wframe-larger-than=1024 -MD -Wall -save-temps=obj -Wextra -Wshadow -Werror -g -ggdb -fPIC

Thanks,
Ohad
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Wframe-larger-than flag bug

Hans Wennborg via cfe-dev
Ah, right, sorry I didn't reproduce your steps exactly - thanks for highlighting the save-temps aspect.

Yeah, testing this with clang trunk (which, on godbolt, is built with assertions enabled) this crashes the compiler. Something about frame-larger-than doesn't work with save-temps, which doesn't super surprise me, -Wframe-larger-than with -fsyntax-only doesn't produce any warning (frame-larger-than is implemented in the code generation pipeline, as much as we try to avoid doing that for warnings in clang, this one's an exception).


On Sat, Jan 25, 2020 at 2:15 PM Ohad Alali <[hidden email]> wrote:
Thanks for your response.
I've opened your link and it's seems that clang (trunk) is not handle the flag -save-temps=obj. compilation with -save-temps: https://godbolt.org/z/-neaMs
When changing the compiler to clang v0.8, same behaviour as describe before.
with flag -save-temps=obj: https://godbolt.org/z/gzpFGD
without flag -save-temps=obj: https://godbolt.org/z/5uABvL

Thanks,
Ohad



‫בתאריך שבת, 25 בינו׳ 2020 ב-8:16 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬

On Sun, Jan 5, 2020 at 6:45 AM Ohad Alali via cfe-dev <[hidden email]> wrote:
Hi,

I'm compiling my project with clang version 7.0.0-3.
I added compilation flag frame-larger-than in order to warning using more than 1024 bytes.

clang indeed warning as expected, but when I added -Werror in order to treat the warning as error clang ignore this flag and it stays warning.

the compilation flags include also save-temps=obj, when I remove this flag the warning treated as error.

Does save-temps flag should be related to -Werror or -Wframe-larger-than?

full compilation flags:  
clang++-7 -D_SYS_LINUX_ -D_HOSTSYS_LINUX_ -D_CPU_  -D_SYS64_ -D_DEBUG_ -O2  -Wframe-larger-than=1024 -MD -Wall -save-temps=obj -Wextra -Wshadow -Werror -g -ggdb -fPIC

Thanks,
Ohad
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Wframe-larger-than flag bug

Hans Wennborg via cfe-dev
Thanks

‫בתאריך יום א׳, 26 בינו׳ 2020 ב-5:56 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬
Ah, right, sorry I didn't reproduce your steps exactly - thanks for highlighting the save-temps aspect.

Yeah, testing this with clang trunk (which, on godbolt, is built with assertions enabled) this crashes the compiler. Something about frame-larger-than doesn't work with save-temps, which doesn't super surprise me, -Wframe-larger-than with -fsyntax-only doesn't produce any warning (frame-larger-than is implemented in the code generation pipeline, as much as we try to avoid doing that for warnings in clang, this one's an exception).


On Sat, Jan 25, 2020 at 2:15 PM Ohad Alali <[hidden email]> wrote:
Thanks for your response.
I've opened your link and it's seems that clang (trunk) is not handle the flag -save-temps=obj. compilation with -save-temps: https://godbolt.org/z/-neaMs
When changing the compiler to clang v0.8, same behaviour as describe before.
with flag -save-temps=obj: https://godbolt.org/z/gzpFGD
without flag -save-temps=obj: https://godbolt.org/z/5uABvL

Thanks,
Ohad



‫בתאריך שבת, 25 בינו׳ 2020 ב-8:16 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬

On Sun, Jan 5, 2020 at 6:45 AM Ohad Alali via cfe-dev <[hidden email]> wrote:
Hi,

I'm compiling my project with clang version 7.0.0-3.
I added compilation flag frame-larger-than in order to warning using more than 1024 bytes.

clang indeed warning as expected, but when I added -Werror in order to treat the warning as error clang ignore this flag and it stays warning.

the compilation flags include also save-temps=obj, when I remove this flag the warning treated as error.

Does save-temps flag should be related to -Werror or -Wframe-larger-than?

full compilation flags:  
clang++-7 -D_SYS_LINUX_ -D_HOSTSYS_LINUX_ -D_CPU_  -D_SYS64_ -D_DEBUG_ -O2  -Wframe-larger-than=1024 -MD -Wall -save-temps=obj -Wextra -Wshadow -Werror -g -ggdb -fPIC

Thanks,
Ohad
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Wframe-larger-than flag bug

Hans Wennborg via cfe-dev
Just to clarify, I cannot use flags -Wframe-larger-than, -Werror and -save-temps=obj and get error instead of warning. right?

‫בתאריך יום א׳, 26 בינו׳ 2020 ב-8:35 מאת ‪Ohad Alali‬‏ <‪[hidden email]‬‏>:‬
Thanks

‫בתאריך יום א׳, 26 בינו׳ 2020 ב-5:56 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬
Ah, right, sorry I didn't reproduce your steps exactly - thanks for highlighting the save-temps aspect.

Yeah, testing this with clang trunk (which, on godbolt, is built with assertions enabled) this crashes the compiler. Something about frame-larger-than doesn't work with save-temps, which doesn't super surprise me, -Wframe-larger-than with -fsyntax-only doesn't produce any warning (frame-larger-than is implemented in the code generation pipeline, as much as we try to avoid doing that for warnings in clang, this one's an exception).


On Sat, Jan 25, 2020 at 2:15 PM Ohad Alali <[hidden email]> wrote:
Thanks for your response.
I've opened your link and it's seems that clang (trunk) is not handle the flag -save-temps=obj. compilation with -save-temps: https://godbolt.org/z/-neaMs
When changing the compiler to clang v0.8, same behaviour as describe before.
with flag -save-temps=obj: https://godbolt.org/z/gzpFGD
without flag -save-temps=obj: https://godbolt.org/z/5uABvL

Thanks,
Ohad



‫בתאריך שבת, 25 בינו׳ 2020 ב-8:16 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬

On Sun, Jan 5, 2020 at 6:45 AM Ohad Alali via cfe-dev <[hidden email]> wrote:
Hi,

I'm compiling my project with clang version 7.0.0-3.
I added compilation flag frame-larger-than in order to warning using more than 1024 bytes.

clang indeed warning as expected, but when I added -Werror in order to treat the warning as error clang ignore this flag and it stays warning.

the compilation flags include also save-temps=obj, when I remove this flag the warning treated as error.

Does save-temps flag should be related to -Werror or -Wframe-larger-than?

full compilation flags:  
clang++-7 -D_SYS_LINUX_ -D_HOSTSYS_LINUX_ -D_CPU_  -D_SYS64_ -D_DEBUG_ -O2  -Wframe-larger-than=1024 -MD -Wall -save-temps=obj -Wextra -Wshadow -Werror -g -ggdb -fPIC

Thanks,
Ohad
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Wframe-larger-than flag bug

Hans Wennborg via cfe-dev
Doesn't look like it, no. 

I wouldn't recommend using -Wframe-larger-than and -save-temps (even without -Werror) really, since that seems to crash the compiler, there's probably no great guarantees about what that's doing.

On Sat, Jan 25, 2020 at 10:40 PM Ohad Alali <[hidden email]> wrote:
Just to clarify, I cannot use flags -Wframe-larger-than, -Werror and -save-temps=obj and get error instead of warning. right?

‫בתאריך יום א׳, 26 בינו׳ 2020 ב-8:35 מאת ‪Ohad Alali‬‏ <‪[hidden email]‬‏>:‬
Thanks

‫בתאריך יום א׳, 26 בינו׳ 2020 ב-5:56 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬
Ah, right, sorry I didn't reproduce your steps exactly - thanks for highlighting the save-temps aspect.

Yeah, testing this with clang trunk (which, on godbolt, is built with assertions enabled) this crashes the compiler. Something about frame-larger-than doesn't work with save-temps, which doesn't super surprise me, -Wframe-larger-than with -fsyntax-only doesn't produce any warning (frame-larger-than is implemented in the code generation pipeline, as much as we try to avoid doing that for warnings in clang, this one's an exception).


On Sat, Jan 25, 2020 at 2:15 PM Ohad Alali <[hidden email]> wrote:
Thanks for your response.
I've opened your link and it's seems that clang (trunk) is not handle the flag -save-temps=obj. compilation with -save-temps: https://godbolt.org/z/-neaMs
When changing the compiler to clang v0.8, same behaviour as describe before.
with flag -save-temps=obj: https://godbolt.org/z/gzpFGD
without flag -save-temps=obj: https://godbolt.org/z/5uABvL

Thanks,
Ohad



‫בתאריך שבת, 25 בינו׳ 2020 ב-8:16 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬

On Sun, Jan 5, 2020 at 6:45 AM Ohad Alali via cfe-dev <[hidden email]> wrote:
Hi,

I'm compiling my project with clang version 7.0.0-3.
I added compilation flag frame-larger-than in order to warning using more than 1024 bytes.

clang indeed warning as expected, but when I added -Werror in order to treat the warning as error clang ignore this flag and it stays warning.

the compilation flags include also save-temps=obj, when I remove this flag the warning treated as error.

Does save-temps flag should be related to -Werror or -Wframe-larger-than?

full compilation flags:  
clang++-7 -D_SYS_LINUX_ -D_HOSTSYS_LINUX_ -D_CPU_  -D_SYS64_ -D_DEBUG_ -O2  -Wframe-larger-than=1024 -MD -Wall -save-temps=obj -Wextra -Wshadow -Werror -g -ggdb -fPIC

Thanks,
Ohad
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Wframe-larger-than flag bug

Hans Wennborg via cfe-dev
Ok, thanks a lot for your help.
‫בתאריך יום א׳, 26 בינו׳ 2020 ב-8:42 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬
Doesn't look like it, no. 

I wouldn't recommend using -Wframe-larger-than and -save-temps (even without -Werror) really, since that seems to crash the compiler, there's probably no great guarantees about what that's doing.

On Sat, Jan 25, 2020 at 10:40 PM Ohad Alali <[hidden email]> wrote:
Just to clarify, I cannot use flags -Wframe-larger-than, -Werror and -save-temps=obj and get error instead of warning. right?

‫בתאריך יום א׳, 26 בינו׳ 2020 ב-8:35 מאת ‪Ohad Alali‬‏ <‪[hidden email]‬‏>:‬
Thanks

‫בתאריך יום א׳, 26 בינו׳ 2020 ב-5:56 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬
Ah, right, sorry I didn't reproduce your steps exactly - thanks for highlighting the save-temps aspect.

Yeah, testing this with clang trunk (which, on godbolt, is built with assertions enabled) this crashes the compiler. Something about frame-larger-than doesn't work with save-temps, which doesn't super surprise me, -Wframe-larger-than with -fsyntax-only doesn't produce any warning (frame-larger-than is implemented in the code generation pipeline, as much as we try to avoid doing that for warnings in clang, this one's an exception).


On Sat, Jan 25, 2020 at 2:15 PM Ohad Alali <[hidden email]> wrote:
Thanks for your response.
I've opened your link and it's seems that clang (trunk) is not handle the flag -save-temps=obj. compilation with -save-temps: https://godbolt.org/z/-neaMs
When changing the compiler to clang v0.8, same behaviour as describe before.
with flag -save-temps=obj: https://godbolt.org/z/gzpFGD
without flag -save-temps=obj: https://godbolt.org/z/5uABvL

Thanks,
Ohad



‫בתאריך שבת, 25 בינו׳ 2020 ב-8:16 מאת ‪David Blaikie‬‏ <‪[hidden email]‬‏>:‬

On Sun, Jan 5, 2020 at 6:45 AM Ohad Alali via cfe-dev <[hidden email]> wrote:
Hi,

I'm compiling my project with clang version 7.0.0-3.
I added compilation flag frame-larger-than in order to warning using more than 1024 bytes.

clang indeed warning as expected, but when I added -Werror in order to treat the warning as error clang ignore this flag and it stays warning.

the compilation flags include also save-temps=obj, when I remove this flag the warning treated as error.

Does save-temps flag should be related to -Werror or -Wframe-larger-than?

full compilation flags:  
clang++-7 -D_SYS_LINUX_ -D_HOSTSYS_LINUX_ -D_CPU_  -D_SYS64_ -D_DEBUG_ -O2  -Wframe-larger-than=1024 -MD -Wall -save-temps=obj -Wextra -Wshadow -Werror -g -ggdb -fPIC

Thanks,
Ohad
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev