public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21656] New: Spurious "template with C linkage" error message
@ 2005-05-18 21:22 pkoning at equallogic dot com
  2005-05-18 21:26 ` [Bug target/21656] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: pkoning at equallogic dot com @ 2005-05-18 21:22 UTC (permalink / raw)
  To: gcc-bugs

This test program:

# 1 "test.cc"
# 1 "np.h" 1
# 1 "Math.h" 1 3 4
template<class T> static inline void push(T* element, T** head)
{
 element->m_flink = *head;
 *head = element;
}

produces:

In file included from test.cc:2:
Math.h:1: error: template with C linkage

If I delete the "# 1 "Math.h" 1 3 4" then it works.

Strangely enough, it also works on different builds of the same version: for
example, the native (i386) build, as well as a build targeted to
mipsel-netbsdelf, both accept the test program without complaint.

The failing compiler's --verbose output is:

mips64el-elf-g++ --verbose
Using built-in specs.
Target: mips64el-elf
Configured with: /buildarea/GCC40/gcc-4.0.0/configure
--prefix=/usr/local/EQLGCC_v7/mips64el --enable-languages=c,c++
--target=mips64el-elf --with-newlib --with-arch=sb1 --with-tune=sb1
--with-gnu-as --with-gnu-ld
Thread model: single
gcc version 4.0.0

-- 
           Summary: Spurious "template with C linkage" error message
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pkoning at equallogic dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-netbsdelf1.6.2
  GCC host triplet: i386-unknown-netbsdelf1.6.2
GCC target triplet: mips64el-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21656


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/21656] Spurious "template with C linkage" error message
  2005-05-18 21:22 [Bug c++/21656] New: Spurious "template with C linkage" error message pkoning at equallogic dot com
@ 2005-05-18 21:26 ` pinskia at gcc dot gnu dot org
  2005-05-18 21:41 ` pkoning at equallogic dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-18 21:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-18 21:26 -------
This is a target problem, it is not defining NO_IMPLICIT_EXTERN_C.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target
  GCC build triplet|i386-unknown-netbsdelf1.6.2 |
   GCC host triplet|i386-unknown-netbsdelf1.6.2 |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21656


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/21656] Spurious "template with C linkage" error message
  2005-05-18 21:22 [Bug c++/21656] New: Spurious "template with C linkage" error message pkoning at equallogic dot com
  2005-05-18 21:26 ` [Bug target/21656] " pinskia at gcc dot gnu dot org
@ 2005-05-18 21:41 ` pkoning at equallogic dot com
  2005-07-04  9:37 ` rsandifo at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pkoning at equallogic dot com @ 2005-05-18 21:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pkoning at equallogic dot com  2005-05-18 21:41 -------
Thanks.  I added that to config/mips/elf.h and it works correctly now.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21656


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/21656] Spurious "template with C linkage" error message
  2005-05-18 21:22 [Bug c++/21656] New: Spurious "template with C linkage" error message pkoning at equallogic dot com
  2005-05-18 21:26 ` [Bug target/21656] " pinskia at gcc dot gnu dot org
  2005-05-18 21:41 ` pkoning at equallogic dot com
@ 2005-07-04  9:37 ` rsandifo at gcc dot gnu dot org
  2005-07-09  8:55 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-07-04  9:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rsandifo at gcc dot gnu dot org  2005-07-04 09:36 -------
OK, I'll run that change through dejagnu and commit if there are no problems.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rsandifo at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-04 09:36:39
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21656


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/21656] Spurious "template with C linkage" error message
  2005-05-18 21:22 [Bug c++/21656] New: Spurious "template with C linkage" error message pkoning at equallogic dot com
                   ` (2 preceding siblings ...)
  2005-07-04  9:37 ` rsandifo at gcc dot gnu dot org
@ 2005-07-09  8:55 ` cvs-commit at gcc dot gnu dot org
  2005-07-09  8:57 ` rsandifo at gcc dot gnu dot org
  2005-07-09  9:16 ` rsandifo at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-09  8:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-07-09 08:46 -------
Subject: Bug 21656

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rsandifo@gcc.gnu.org	2005-07-09 08:46:35

Modified files:
	gcc            : ChangeLog 
	gcc/config/mips: elf.h 

Log message:
	PR target/21656
	* config/mips/elf.h (NO_IMPLICIT_EXTERN_C): Define.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9392&r2=2.9393
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/elf.h.diff?cvsroot=gcc&r1=1.63&r2=1.64



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21656


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/21656] Spurious "template with C linkage" error message
  2005-05-18 21:22 [Bug c++/21656] New: Spurious "template with C linkage" error message pkoning at equallogic dot com
                   ` (3 preceding siblings ...)
  2005-07-09  8:55 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-09  8:57 ` rsandifo at gcc dot gnu dot org
  2005-07-09  9:16 ` rsandifo at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-07-09  8:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rsandifo at gcc dot gnu dot org  2005-07-09 08:55 -------
Committed to mainline.

Let me know if this is a regression from an earlier release.  I'll then apply
the patch to the appropriate branches.  I'll tentatively close this PR as fixed
in the meantime.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
            Version|4.0.0                       |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21656


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/21656] Spurious "template with C linkage" error message
  2005-05-18 21:22 [Bug c++/21656] New: Spurious "template with C linkage" error message pkoning at equallogic dot com
                   ` (4 preceding siblings ...)
  2005-07-09  8:57 ` rsandifo at gcc dot gnu dot org
@ 2005-07-09  9:16 ` rsandifo at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-07-09  9:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rsandifo at gcc dot gnu dot org  2005-07-09 08:56 -------
Sorry, changed "Reported against" field instead of "Target Milestone".

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0
            Version|4.1.0                       |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21656


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-07-09  8:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-18 21:22 [Bug c++/21656] New: Spurious "template with C linkage" error message pkoning at equallogic dot com
2005-05-18 21:26 ` [Bug target/21656] " pinskia at gcc dot gnu dot org
2005-05-18 21:41 ` pkoning at equallogic dot com
2005-07-04  9:37 ` rsandifo at gcc dot gnu dot org
2005-07-09  8:55 ` cvs-commit at gcc dot gnu dot org
2005-07-09  8:57 ` rsandifo at gcc dot gnu dot org
2005-07-09  9:16 ` rsandifo at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).