public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "deathbaba at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/35087] New: g++ fails to compile local class which is passed to template function Date: Tue, 05 Feb 2008 09:24:00 -0000 [thread overview] Message-ID: <bug-35087-15728@http.gcc.gnu.org/bugzilla/> (raw) The code example below compiles successfully under Microsoft Visual Studio 2005 SP1. Minimal steps to reproduce: ------------------------------------------------- template<typename T> void foo(T &) {} int main() { struct A { int m; }; A a; foo(a); return 0; } ----------------------------------------- alexz@alexz-debian:~$ g++ test.cpp test.cpp: In function 'int main()': test.cpp:11: error: no matching function for call to 'foo(main()::A&)' alexz@alexz-debian:~$ g++ -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu Thread model: posix gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) -- Summary: g++ fails to compile local class which is passed to template function Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: deathbaba at gmail dot com GCC host triplet: Linux version 2.6.18-4-k7 (Debian 2.6.18.dfsg.1-12) (waldi@debia http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35087
next reply other threads:[~2008-02-05 9:24 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-02-05 9:24 deathbaba at gmail dot com [this message] 2008-02-05 10:05 ` [Bug c++/35087] " pcarlini at suse dot de
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-35087-15728@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).