This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ parser issue [templ.res]
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "jan at etpmod dot phys dot tue dot nl" <jan at etpmod dot phys dot tue dot nl>, "gcc at gnu dot org" <gcc at gnu dot org>
- Date: 28 Jan 2003 20:19:50 +0100
- Subject: Re: C++ parser issue [templ.res]
- Organization: Integrable Solutions
- References: <61030000.1043774708@warlock.codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
| --On Tuesday, January 28, 2003 05:03:00 PM +0000 Jan Van Dijk
| <janvandijkinjapan@yahoo.co.jp> wrote:
|
| > void good(){ f(); } // no B<T>:: required
|
| I *think* this is a parser bug; i.e., this should be an error.
|
| The question is whether any of the arguments to the function is
| dependent. Since we are in a non-static member function, a key
| question is whether the "this" parameter should be included, but
| I think not.
"f()" in the above expression is neither a type-dependent expression
nor a value-dependent expression 14.6.2/1:
[...] Expressions may be type-dependent (on the type of a tem-plate
parameter) or value-dependent (on the value of a non-type template
parameter). In an expression of the form:
postfix-expression ( expression-list opt )
where the postfix-expression is an identifier, the identifier
denotes a dependent name if and only if any of the expressions in
the expression-list is a type-dependent expression (14.6.2.2).
therefore 14.6.3/1 applies.
-- Gaby