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

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).