public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Gabriel Dos Reis <gdr@integrable-solutions.net> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/8772: Segmentation fault on 3 lines of template code Date: Sat, 18 Jan 2003 09:36:00 -0000 [thread overview] Message-ID: <20030118093601.29476.qmail@sources.redhat.com> (raw) The following reply was made to PR c++/8772; it has been noted by GNATS. From: Gabriel Dos Reis <gdr@integrable-solutions.net> To: Wolfgang Bangerth <bangerth@ticam.utexas.edu> Cc: Volker Reichelt <reichelt@igpm.rwth-aachen.de>, gcc-gnats@gcc.gnu.org, <sneechy@hotmail.com>, <gcc-bugs@gcc.gnu.org> Subject: Re: c++/8772: Segmentation fault on 3 lines of template code Date: 18 Jan 2003 10:28:18 +0100 Wolfgang Bangerth <bangerth@ticam.utexas.edu> writes: | > What are we going to do with the PR w.r.t. the how-to-make-to-code-legal | > issue? Leave it open, close it, suspend it, open a new PR? | | Good question. Just to recall this briefly: this code | --------------- | template <int> struct A { | template <int> struct B { enum { v = 1 }; }; | }; | | template <template <int> class F> struct C { | enum { v = F<1>::v || 2 }; | }; | | template <int n> struct D { | enum { v = C<A<n>::B>::v }; | }; | ----------------------- | generated an ICE (now errors), and the question was: is in the last line | C<A<n>::B> | something meaningful? Wouldn't we have to write | C<typename A<n>::B> | ? This doesn't compile either presently. | | Gaby's suggestion was that this needs to be further disambiguated as | C<typename A<n>::template B> Actually I suggeted: C<A<n>::template B> | which would not be covered by the standard (the oversight Gaby spoke of), | but be reasonable. However, this still doesn't compile presently: | g/a> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.cc | x.cc:10: error: template argument 1 is invalid | | What does compile is (also with icc7, by the way) | C<A<n>::template B> | | Gaby, is the latter the syntax you had in mind to be legal, i.e. put | differently: no need for "typename"? Yes, that is what I talking about. Incidently, as I said, Iraised the issue ad John Spicer (EDG) tolad me that he already came across the same issue, made a (revised) suggestion that matches mine, see http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2000/n1231.html | | If yes, then I would say gcc presently does its best and we should close | the report. Well, the diagnostic is still incorrect; I believe we should rephrase teh synopsis to indicate that | If the inquire Gaby did with the ISO committee finds some | other solution, then this will be put into a DR anyway, and there is no | need to keep the report open presently anyway. This is already reported to committee and there seems to be agreement that the code should be made work with 'template' prefix. -- Gaby
next reply other threads:[~2003-01-18 9:36 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-01-18 9:36 Gabriel Dos Reis [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-01-20 9:46 Volker Reichelt 2003-01-17 15:56 Wolfgang Bangerth 2003-01-17 14:56 Volker Reichelt 2002-12-03 8:16 Gabriel Dos Reis 2002-12-03 8:06 Wolfgang Bangerth 2002-12-02 14:56 Gabriel Dos Reis 2002-12-02 12:45 bangerth 2002-12-01 1:46 Paolo Carlini
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=20030118093601.29476.qmail@sources.redhat.com \ --to=gdr@integrable-solutions.net \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).