[Bug sanitizer/80063] gcc/asan.c: PVS-Studio: Incorrect Block Delimitation (CWE-483)

2017-03-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80063 --- Comment #8 from Marek Polacek --- I created PR80116 to track the warning addition.

[Bug sanitizer/80063] gcc/asan.c: PVS-Studio: Incorrect Block Delimitation (CWE-483)

2017-03-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80063 Marek Polacek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug sanitizer/80063] gcc/asan.c: PVS-Studio: Incorrect Block Delimitation (CWE-483)

2017-03-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80063 --- Comment #6 from Marek Polacek --- Author: mpolacek Date: Mon Mar 20 13:31:28 2017 New Revision: 246278 URL: https://gcc.gnu.org/viewcvs?rev=246278=gcc=rev Log: PR sanitizer/80063 * asan.c (DEF_SANITIZER_BUILTIN): Use do { }

[Bug sanitizer/80063] gcc/asan.c: PVS-Studio: Incorrect Block Delimitation (CWE-483)

2017-03-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80063 --- Comment #5 from Jakub Jelinek --- As for the warning, we should open an enhancement request, though not sure it is something for -Wmisleading-indentation. I'd say that we just should warn whenever a macro defines several statements and the

[Bug sanitizer/80063] gcc/asan.c: PVS-Studio: Incorrect Block Delimitation (CWE-483)

2017-03-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80063 --- Comment #4 from Jakub Jelinek --- Please reformat it properly: #define DEF_SANITIZER_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ do { \ decl = add_builtin_function ("__builtin_" NAME,

[Bug sanitizer/80063] gcc/asan.c: PVS-Studio: Incorrect Block Delimitation (CWE-483)

2017-03-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80063 --- Comment #3 from Marek Polacek --- Guess we should --- a/gcc/asan.c +++ b/gcc/asan.c @@ -2566,11 +2566,12 @@ initialize_sanitizer_builtins (void) #undef DEF_BUILTIN_STUB #define DEF_BUILTIN_STUB(ENUM, NAME) #undef DEF_SANITIZER_BUILTIN

[Bug sanitizer/80063] gcc/asan.c: PVS-Studio: Incorrect Block Delimitation (CWE-483)

2017-03-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80063 Manuel López-Ibáñez changed: What|Removed |Added Keywords||diagnostic CC|

[Bug sanitizer/80063] gcc/asan.c: PVS-Studio: Incorrect Block Delimitation (CWE-483)

2017-03-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80063 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|