[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #65129] -Wstrict-aliasing warnings
From: |
anonymous |
Subject: |
[bug #65129] -Wstrict-aliasing warnings |
Date: |
Fri, 5 Jan 2024 08:23:34 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65129>
Summary: -Wstrict-aliasing warnings
Group: gperf
Submitter: None
Submitted: Fri 05 Jan 2024 01:23:34 PM UTC
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Fri 05 Jan 2024 01:23:34 PM UTC By: Anonymous
```
./configure CC=gcc-13 CXX=g++-13; make CFLAGS="-O2 -Werror=strict-aliasing"
CXXFLAGS="-O2 -Werror=strict-aliasing" CC=gcc-13 CXX=g++-13
[...]
g++-13 -O2 -Werror=strict-aliasing -I. -I./../lib -c ./keyword-list.cc
In file included from ./keyword-list.h:78,
from ./keyword-list.cc:22:
./keyword-list.icc: In member function 'KeywordExt_List*&
KeywordExt_List::rest()':
./keyword-list.icc:50:11: error: dereferencing type-punned pointer will break
strict-aliasing rules [-Werror=strict-aliasing]
50 | return *reinterpret_cast<KeywordExt_List**>(&_cdr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[1]: *** [Makefile:107: keyword-list.o] Error 1
make[1]: Leaving directory '/tmp/gperf/src'
make: *** [Makefile:34: all] Error 2
```
```
$ gcc-13 --version
gcc-13 (Gentoo Hardened 13.2.1_p20231230 p11) 13.2.1 20231230
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65129>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #65129] -Wstrict-aliasing warnings,
anonymous <=