aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-01-05 01:30:10 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2004-01-05 01:30:10 +0000
commit643aee72b356e174bf47a45bcba466e586039858 (patch)
tree37c767ad4a07cc856de77e6d1a5a14fb95d2b3a7 /gcc
parentae0eb5f1bcaf91aa9257e493cf879f2d9d16c29d (diff)
downloadgcc-643aee72b356e174bf47a45bcba466e586039858.zip
gcc-643aee72b356e174bf47a45bcba466e586039858.tar.gz
gcc-643aee72b356e174bf47a45bcba466e586039858.tar.bz2
* parser.c (cp_parser_parameter_declaration): Fix comment.
From-SVN: r75409
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/parser.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 08600f7..c5d10d8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,7 @@
2004-01-04 Mark Mitchell <mark@codesourcery.com>
+ * parser.c (cp_parser_parameter_declaration): Fix comment.
+
PR c++/12226
* call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
(reference_binding): Set it when appropriate.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 2edc777..76de7a0 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -3909,8 +3909,9 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p)
/* These operators may not appear in constant-expressions. */
if (parser->integral_constant_expression_p
/* The "->" operator is allowed in the implementation
- of "offsetof". */
- && !(parser->in_offsetof_p && token_type == CPP_DEREF))
+ of "offsetof". The "." operator may appear in the
+ name of the member. */
+ && !parser->in_offsetof_p)
{
if (!parser->allow_non_integral_constant_expression_p)
postfix_expression
@@ -10977,12 +10978,13 @@ cp_parser_parameter_declaration (cp_parser *parser,
expression. Therefore, if parsing tentatively, we commit at
this point. */
if (!parser->in_template_argument_list_p
- /* Having seen:
+ /* In an expression context, having seen:
(int((char *)...
we cannot be sure whether we are looking at a
- function-type (taking a */
+ function-type (taking a "char*" as a parameter) or a cast
+ of some object of type "char*" to "int". */
&& !parser->in_type_id_in_expr_p
&& cp_parser_parsing_tentatively (parser)
&& !cp_parser_committed_to_tentative_parse (parser)