summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-09 06:22:17 +0000
committerak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-09 06:22:17 +0000
commitb74d9e7a4a76afe4fd769881525f89f89324be8c (patch)
tree52a5bd6930c3d113582f4fe1521055baf074f289 /gcc/varasm.c
parent9eae7f95a94f8d4e25581d17c8cc5f52a0133a56 (diff)
downloadgcc-b74d9e7a4a76afe4fd769881525f89f89324be8c.tar.gz
better warning for section conflict
gcc/: 2011-06-08 Andi Kleen <ak@linux.intel.com> * varasm.c (get_section): Print location of other conflict for section conflicts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174836 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 3311c86a9ea..a0a0582be76 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -313,7 +313,11 @@ get_section (const char *name, unsigned int flags, tree decl)
if (decl == 0)
decl = sect->named.decl;
gcc_assert (decl);
- error ("%+D causes a section type conflict", decl);
+ error ("%+D causes a section type conflict with %D",
+ decl, sect->named.decl);
+ if (decl != sect->named.decl)
+ inform (DECL_SOURCE_LOCATION (sect->named.decl),
+ "%qD was declared here", sect->named.decl);
/* Make sure we don't error about one section multiple times. */
sect->common.flags |= SECTION_OVERRIDE;
}