public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] testsuite: discard c++ exclusion on underaligned pointer warning
@ 2023-11-19  6:31 Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2023-11-19  6:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8af7267810bf90b2f42c6bdcd681777a7a0f4618

commit 8af7267810bf90b2f42c6bdcd681777a7a0f4618
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Sun Nov 19 01:26:50 2023 -0300

    testsuite: discard c++ exclusion on underaligned pointer warning
    
    Having extended check_and_warn_address_or_pointer_of_packed_member to
    find the packed (short) enum pointer in the cast expression coming
    from the C++ front-end, and amended the C++ front end to mark short
    enums as TYPE_PACKED, C++ issues the same warning that C does for
    c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c,
    so drop the exclusion.
    
    
    for  gcc/testsuite/ChangeLog
    
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
            Expect warning in C++ as well.
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
            Likewise.

Diff:
---
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c        | 2 +-
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
index aaa2031b6dc..bf5bf5cc2e2 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {
diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
index 6c96f5a76ef..7c2710c64d3 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] testsuite: discard c++ exclusion on underaligned pointer warning
@ 2023-11-29  4:38 Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2023-11-29  4:38 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1625c82e787d7d0b80eaf4f704c1ea2bb0f7ff5d

commit 1625c82e787d7d0b80eaf4f704c1ea2bb0f7ff5d
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Sun Nov 19 01:26:50 2023 -0300

    testsuite: discard c++ exclusion on underaligned pointer warning
    
    Having extended check_and_warn_address_or_pointer_of_packed_member to
    find the packed (short) enum pointer in the cast expression coming
    from the C++ front-end, and amended the C++ front end to mark short
    enums as TYPE_PACKED, C++ issues the same warning that C does for
    c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c,
    so drop the exclusion.
    
    
    for  gcc/testsuite/ChangeLog
    
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
            Expect warning in C++ as well.
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
            Likewise.

Diff:
---
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c        | 2 +-
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
index aaa2031b6dc..bf5bf5cc2e2 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {
diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
index 6c96f5a76ef..7c2710c64d3 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] testsuite: discard c++ exclusion on underaligned pointer warning
@ 2023-11-23 11:46 Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2023-11-23 11:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:408859f9615233eefdd0e689c0e3e01b1ab075ba

commit 408859f9615233eefdd0e689c0e3e01b1ab075ba
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Sun Nov 19 01:26:50 2023 -0300

    testsuite: discard c++ exclusion on underaligned pointer warning
    
    Having extended check_and_warn_address_or_pointer_of_packed_member to
    find the packed (short) enum pointer in the cast expression coming
    from the C++ front-end, and amended the C++ front end to mark short
    enums as TYPE_PACKED, C++ issues the same warning that C does for
    c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c,
    so drop the exclusion.
    
    
    for  gcc/testsuite/ChangeLog
    
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
            Expect warning in C++ as well.
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
            Likewise.

Diff:
---
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c        | 2 +-
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
index aaa2031b6dc..bf5bf5cc2e2 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {
diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
index 6c96f5a76ef..7c2710c64d3 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] testsuite: discard c++ exclusion on underaligned pointer warning
@ 2023-11-19  8:32 Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2023-11-19  8:32 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2a559236550c7e126b04c85512a8ea7203426a98

commit 2a559236550c7e126b04c85512a8ea7203426a98
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Sun Nov 19 01:26:50 2023 -0300

    testsuite: discard c++ exclusion on underaligned pointer warning
    
    Having extended check_and_warn_address_or_pointer_of_packed_member to
    find the packed (short) enum pointer in the cast expression coming
    from the C++ front-end, and amended the C++ front end to mark short
    enums as TYPE_PACKED, C++ issues the same warning that C does for
    c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c,
    so drop the exclusion.
    
    
    for  gcc/testsuite/ChangeLog
    
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
            Expect warning in C++ as well.
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
            Likewise.

Diff:
---
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c        | 2 +-
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
index aaa2031b6dc..bf5bf5cc2e2 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {
diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
index 6c96f5a76ef..7c2710c64d3 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] testsuite: discard c++ exclusion on underaligned pointer warning
@ 2023-11-19  8:19 Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2023-11-19  8:19 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bec44fdc5bfdca7c538f3508a3d987f28c0e9613

commit bec44fdc5bfdca7c538f3508a3d987f28c0e9613
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Sun Nov 19 01:26:50 2023 -0300

    testsuite: discard c++ exclusion on underaligned pointer warning
    
    Having extended check_and_warn_address_or_pointer_of_packed_member to
    find the packed (short) enum pointer in the cast expression coming
    from the C++ front-end, and amended the C++ front end to mark short
    enums as TYPE_PACKED, C++ issues the same warning that C does for
    c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c,
    so drop the exclusion.
    
    
    for  gcc/testsuite/ChangeLog
    
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
            Expect warning in C++ as well.
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
            Likewise.

Diff:
---
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c        | 2 +-
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
index aaa2031b6dc..bf5bf5cc2e2 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {
diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
index 6c96f5a76ef..7c2710c64d3 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] testsuite: discard c++ exclusion on underaligned pointer warning
@ 2023-11-19  8:11 Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2023-11-19  8:11 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:64a1d6f99c21656914b528302fb0efa77dfbd15f

commit 64a1d6f99c21656914b528302fb0efa77dfbd15f
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Sun Nov 19 01:26:50 2023 -0300

    testsuite: discard c++ exclusion on underaligned pointer warning
    
    Having extended check_and_warn_address_or_pointer_of_packed_member to
    find the packed (short) enum pointer in the cast expression coming
    from the C++ front-end, and amended the C++ front end to mark short
    enums as TYPE_PACKED, C++ issues the same warning that C does for
    c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c,
    so drop the exclusion.
    
    
    for  gcc/testsuite/ChangeLog
    
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
            Expect warning in C++ as well.
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
            Likewise.

Diff:
---
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c        | 2 +-
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
index aaa2031b6dc..bf5bf5cc2e2 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {
diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
index 6c96f5a76ef..7c2710c64d3 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] testsuite: discard c++ exclusion on underaligned pointer warning
@ 2023-11-19  7:02 Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2023-11-19  7:02 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:dc6d6242f2453c49d2bd90d4675a632c1f2fa394

commit dc6d6242f2453c49d2bd90d4675a632c1f2fa394
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Sun Nov 19 01:26:50 2023 -0300

    testsuite: discard c++ exclusion on underaligned pointer warning
    
    Having extended check_and_warn_address_or_pointer_of_packed_member to
    find the packed (short) enum pointer in the cast expression coming
    from the C++ front-end, and amended the C++ front end to mark short
    enums as TYPE_PACKED, C++ issues the same warning that C does for
    c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c,
    so drop the exclusion.
    
    
    for  gcc/testsuite/ChangeLog
    
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
            Expect warning in C++ as well.
            * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
            Likewise.

Diff:
---
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c        | 2 +-
 .../analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
index aaa2031b6dc..bf5bf5cc2e2 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {
diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
index 6c96f5a76ef..7c2710c64d3 100644
--- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
+++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
@@ -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))); /* { dg-warning "unaligned pointer value" "warning" { target short_enums } } */
 }
 static inline struct connection *objt_conn(enum obj_type *t)
 {

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-29  4:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-19  6:31 [gcc(refs/users/aoliva/heads/testme)] testsuite: discard c++ exclusion on underaligned pointer warning Alexandre Oliva
2023-11-19  7:02 Alexandre Oliva
2023-11-19  8:11 Alexandre Oliva
2023-11-19  8:19 Alexandre Oliva
2023-11-19  8:32 Alexandre Oliva
2023-11-23 11:46 Alexandre Oliva
2023-11-29  4:38 Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).