public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Martin von Loewis <loewis@informatik.hu-berlin.de> To: gcc-gnats@gcc.gnu.org Subject: c++/8856: g++ accepts invalid conversion-function-id Date: Sat, 07 Dec 2002 03:36:00 -0000 [thread overview] Message-ID: <200212071127.gB7BR3LT008223@paros.informatik.hu-berlin.de> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1384 bytes --] >Number: 8856 >Category: c++ >Synopsis: g++ accepts invalid conversion-function-id >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Sat Dec 07 03:36:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Martin v. Löwis >Release: 3.1 >Organization: >Environment: System: SunOS paros 5.9 Generic_112233-02 sun4u sparc SUNW,Sun-Blade-1000 Architecture: sun4 host: sparc-sun-solaris2.8 build: sparc-sun-solaris2.8 target: sparc-sun-solaris2.8 configured with: ../configure --host=sparc-sun-solaris2.8 --enable-shared --enable-threads --with-cpu=v8 --with-gnu-ld --with-gnu-as --enable-version-specific-runtime-libs >Description: The following program is accepted, even though operator double<int> is not a valid conversion-function-id (as double is not a template). #include <stdio.h> template <class T> struct A { template <class U> operator U() { return sizeof(U); } }; int main() { A<double> a; int x = a.A<double>::operator int(); double y = a.A<double>::operator double(); int z = a.A<double>::operator double<int>(); printf("%d %f %d\n", x, y, z); } >How-To-Repeat: Compile the above program. >Fix: Work-around: don't use the construct. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-12-07 11:36 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-12-07 3:36 Martin von Loewis [this message] 2002-12-09 11:17 bangerth
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=200212071127.gB7BR3LT008223@paros.informatik.hu-berlin.de \ --to=loewis@informatik.hu-berlin.de \ --cc=gcc-gnats@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).