This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/82209] New: Compile error "X causes a section type conflict with Y" should provide more information
- From: "noloader at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Sep 2017 06:50:19 +0000
- Subject: [Bug c++/82209] New: Compile error "X causes a section type conflict with Y" should provide more information
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82209
Bug ID: 82209
Summary: Compile error "X causes a section type conflict with
Y" should provide more information
Product: gcc
Version: 6.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: noloader at gmail dot com
Target Milestone: ---
We are catching a compile error under GCC 6.10 on AIX. The error is shown
below. The diagnostic message does not appear to have enough information to
troubleshoot the issue. After 3 hours of knob turning we are still experiencing
the issue.
This error is not too common, but when it hits people seem to suffer. The
questions on Stack Overflow and around the web seem to point to a gap in the
error message. That is, the error message does not provide enough information
and most people guess at the cause of the problem.
I found one question that actually tried to troubleshoot the issue by
identifying the objects, their section and the attributes. The OP was doing
things like inspecting *.ii and *.s files, but he/she could not identify the
conflict. Also see https://stackoverflow.com/q/30005764/608639.
Telling me the objects are conflicting, the X and Y in "X causes a section type
conflict with Y", is a good start. I'd like to request the error message be
improved to include (1) the section of each conflicting object, and (2) the
attributes of the section that are contributing to the conflict.
==========
In file included from bench2.cpp:9:0:
gfpcrypt.h: In function 'CryptoPP::DL_PrivateKey_GFP<GP>::~DL_PrivateKey_GFP()
[with GP = CryptoPP::DL_GroupParameters_DSA]':
gfpcrypt.h:519:13: error: CryptoPP::DL_PrivateKey_GFP<GP>::~DL_PrivateKey_GFP()
[with GP = CryptoPP::DL_GroupParameters_DSA] causes a section type conflict
with void CryptoPP::AllocatorWithCleanup<T, T_Align16>::deallocate(void*,
CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type) [with T = unsigned
char; bool T_Align16 = true]
virtual ~DL_PrivateKey_GFP() {}
^
In file included from integer.h:20:0,
from validate.h:8,
from bench2.cpp:6:
secblock.h:217:7: note: 'void CryptoPP::AllocatorWithCleanup<T,
T_Align16>::deallocate(void*, CryptoPP::AllocatorWithCleanup<T,
T_Align16>::size_type) [with T = unsigned char; bool T_Align16 = true]' was
declared here
void deallocate(void *ptr, size_type size)
^~~~~~~~~~
GNUmakefile:1026: recipe for target 'bench2.o' failed