This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR 8702, problem with C++ parser


Hi,

I filed PR 8702, which indicates a problem with the C++ parser:
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&database=gcc&pr=8702

I submitted a testcase, asking if it could be added to the GCC testsuite:
http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01691.html


Today, I tried tracking down which checkin caused this regression.
I think I've tracked it down to this checkin:

Index: ChangeLog
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/ChangeLog,v
retrieving revision 1.2711
retrieving revision 1.2712
diff -d -b -w -u -r1.2711 -r1.2712
--- ChangeLog   16 Mar 2002 01:25:53 -0000      1.2711
+++ ChangeLog   16 Mar 2002 18:30:10 -0000      1.2712
@@ -1,3 +1,30 @@
+2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
+
+       PR c++/4361
+       * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
+       conversion operators go.
+       (struct lang_decl_flags): Add template_conv_p and unused
+       bitfields.
+       (DECL_TEMPLATE_CONV_FN_P): New macro.
+       * call.c (build_user_type_conversion_1): Don't check second type
+       conversion of overload set first.
+       * class.c (add_method): Make sure templated conversion operators
+       all end up on slot 2.
+       * lex.c (do_identifier): A conversion operator token might be
+       satisfied by a templated conversion operator.
+       * mangle.c (struct globals) Add internal_mangling_p member.
+       (write_template_param): Do internal mangling, if needed.
+       (mangle_conv_op_name_for_type): Request internal mangling.
+       * pt.c (check_explicit_specialization): Use
+       CLASSTYPE_FIRST_CONVERSION_SLOT.
+       (template_parm_this_level_p): New function.
+       (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
+       * search.c (lookup_fn_fields_1): Template conversions will be on
+       the first slot.
+       * typeck.c (build_component_ref): Preserve the type of an
+       conversion operator name on the overload type.
+       (build_x_function_call): Retrieve the conversion operator name.
+


Before this checkin, cc1plus can handle my testcase.  After my checkin,
cc1plus cannot handle the testcase and issues a parser error.

A few questions:
(1) Can I commit my testcase to the testsuite, since it is definitely
    a regression from gcc 3.1 and gcc 3.2?

(2) Can someone help look into the problem?

If I could get a patch that could works against the version of
gcc in Apple's CVS repository, that would be great, since I
am doing some work on that platform now.

I could not build the new cp-parser branch today, so could not verify
if it worked with the new C++ parser.

Thanks.
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@attbi.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]