public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "heinlein at informatik dot uni-ulm dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/13829] New: typedef of function type handled incorrectly when used as template argument Date: Fri, 23 Jan 2004 10:22:00 -0000 [thread overview] Message-ID: <20040123102201.13829.heinlein@informatik.uni-ulm.de> (raw) Below, using the typedef name F to declare a member function f of struct X works correctly. When F is passed as a template argument to struct Y, however, the corresponding declaration of f is rejected. ixtys$ uname -a Linux ixtys 2.2.18 #1 Fri Jan 19 22:10:35 GMT 2001 i686 unknown ixtys$ g++ -v Reading specs from /home/heinlein/soft/GCC/3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs Configured with: ../gcc-3.2/configure --prefix=/home/heinlein/soft/GCC/3.2 Thread model: posix gcc version 3.2 ixtys$ g++ -c bug.cxx -save-temps bug.cxx: In instantiation of `Y<int ()()>': bug.cxx:13: instantiated from here bug.cxx:9: field `Y<int ()()>::f' invalidly declared function type ixtys$ cat bug.ii # 1 "bug.cxx" # 1 "<built-in>" # 1 "<command line>" # 1 "bug.cxx" typedef int F (); struct X { F f; }; template <typename T> struct Y { T f; }; X x; Y<F> y; -- Summary: typedef of function type handled incorrectly when used as template argument Product: gcc Version: 3.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: heinlein at informatik dot uni-ulm dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13829
next reply other threads:[~2004-01-23 10:22 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-01-23 10:22 heinlein at informatik dot uni-ulm dot de [this message] 2004-01-23 11:41 ` [Bug c++/13829] " giovannibajo at libero dot it
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=20040123102201.13829.heinlein@informatik.uni-ulm.de \ --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).