Null pointer dereference error in boost::bimap::insert() with strict gcc compiler warnings
Open
- Dominant language
- C++
- Stars
- 26
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
When compiling code that calls e.g. boost::bimap::insert(1, 1) with GCC >=12.1.0 and strict warning flags (-Werror, -Wnull-dereference) and at least -O1, the compiler reports a potential null pointer dereference in std::less::operator(), a false positive.
"error: potential null pointer dereference [-Werror=null-dereference]
{ return __x < __y; }
~~~~^~~~~"
`#include
#include
int main()
{
boost::bimap map;
**map.insert({1, 1});**
return 0;
}`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.