]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert "testsuite: analyzer: expect alignment warning with -fshort-enums"
authorAlexandre Oliva <oliva@gnu.org>
Thu, 30 Nov 2023 06:28:59 +0000 (03:28 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 30 Nov 2023 06:53:50 +0000 (03:53 -0300)
This reverts commit 0e0e3420dfe1d302145b4eb3bbf311a4f39eeced.

gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c

index aaa2031b6dca465cc9d24a7e4a10d535d171be28..c46ffe91a6b4611dfb4afe7424b7227fe9b018bb 100644 (file)
@@ -61,7 +61,7 @@ static inline enum obj_type obj_type(const enum obj_type *t)
 }
 static inline struct connection *__objt_conn(enum obj_type *t)
 {
- return ((struct connection *)(((char *)(t)) - ((long)&((struct connection *)0)->obj_type))); /* { dg-warning "unaligned pointer value" "warning" { target { short_enums && { ! c++ } } } } */
+ return ((struct connection *)(((char *)(t)) - ((long)&((struct connection *)0)->obj_type)));
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {
index 6c96f5a76ef1c8f04d0c3971f9cb9e53a733069f..ef34a76c50d63cdb692d5843bb3db2afe4068ee1 100644 (file)
@@ -60,7 +60,7 @@ static inline enum obj_type obj_type(const enum obj_type *t)
 }
 static inline struct connection *__objt_conn(enum obj_type *t)
 {
- return ((struct connection *)(((char *)(t)) - ((long)&((struct connection *)0)->obj_type))); /* { dg-warning "unaligned pointer value" "warning" { target { short_enums && { ! c++ } } } } */
+ return ((struct connection *)(((char *)(t)) - ((long)&((struct connection *)0)->obj_type)));
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {