Commit 8f2e22ff by Andi Kleen Committed by Andi Kleen

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.

From-SVN: r174836
parent 815cecbe
2011-06-08 Andi Kleen <ak@linux.intel.com> 2011-06-08 Andi Kleen <ak@linux.intel.com>
* varasm.c (get_section): Print location of other conflict
for section conflicts.
2011-06-08 Andi Kleen <ak@linux.intel.com>
* config/i386/driver-i386.c (host_detect_local_cpu): * config/i386/driver-i386.c (host_detect_local_cpu):
Add model 0x2d Intel CPU. Add model 0x2d Intel CPU.
......
...@@ -313,7 +313,11 @@ get_section (const char *name, unsigned int flags, tree decl) ...@@ -313,7 +313,11 @@ get_section (const char *name, unsigned int flags, tree decl)
if (decl == 0) if (decl == 0)
decl = sect->named.decl; decl = sect->named.decl;
gcc_assert (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. */ /* Make sure we don't error about one section multiple times. */
sect->common.flags |= SECTION_OVERRIDE; sect->common.flags |= SECTION_OVERRIDE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment