Re: [PATCH v2] Fix PR c++/25940

2014-03-02 Thread Jason Merrill
On 03/01/2014 08:13 PM, Patrick Palka wrote: On Sat, Mar 1, 2014 at 7:53 PM, Marc Glisse wrote: On Sat, 1 Mar 2014, Patrick Palka wrote: + error_at (input_location, + "redefinition of %q+#D with C language linkage", +

Re: [PATCH v2] Fix PR c++/25940

2014-03-01 Thread Patrick Palka
On Sat, Mar 1, 2014 at 7:53 PM, Marc Glisse wrote: > On Sat, 1 Mar 2014, Patrick Palka wrote: > >> + error_at (input_location, >> + "redefinition of %q+#D with C language >> linkage", >> + x); >> +

Re: [PATCH v2] Fix PR c++/25940

2014-03-01 Thread Marc Glisse
On Sat, 1 Mar 2014, Patrick Palka wrote: + error_at (input_location, + "redefinition of %q+#D with C language linkage", + x); + inform (input_location, + "%q+#D previou

[PATCH v2] Fix PR c++/25940

2014-03-01 Thread Patrick Palka
Hi, The following patch fixes two issues: the first issue is PR c++/25940 and the second is related to PR c++/13699. The first issue is that the C++ frontend fails to reject duplicate definitions of functions declared to have C language linkage. This results in the compiler emitting ASM that def