public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast
       [not found] <20031231234733.13536.dbaron@dbaron.org>
@ 2004-01-01  0:39 ` pinskia at gcc dot gnu dot org
  2004-01-01  0:39 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-01  0:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-01 00:39 -------
Most likely caused by: <http://gcc.gnu.org/ml/gcc-cvs/2003-12/msg00658.html>.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13536


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast
       [not found] <20031231234733.13536.dbaron@dbaron.org>
  2004-01-01  0:39 ` [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast pinskia at gcc dot gnu dot org
@ 2004-01-01  0:39 ` pinskia at gcc dot gnu dot org
  2004-01-01 12:29 ` lerdsuwa at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-01  0:39 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13536


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast
       [not found] <20031231234733.13536.dbaron@dbaron.org>
  2004-01-01  0:39 ` [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast pinskia at gcc dot gnu dot org
  2004-01-01  0:39 ` pinskia at gcc dot gnu dot org
@ 2004-01-01 12:29 ` lerdsuwa at gcc dot gnu dot org
  2004-01-04  9:25 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-01-01 12:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-01-01 12:29 -------
Yup, it's a regression from 3.3.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-01 12:29:54
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13536


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast
       [not found] <20031231234733.13536.dbaron@dbaron.org>
                   ` (2 preceding siblings ...)
  2004-01-01 12:29 ` lerdsuwa at gcc dot gnu dot org
@ 2004-01-04  9:25 ` pinskia at gcc dot gnu dot org
  2004-01-04  9:36 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-04  9:25 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13536


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast
       [not found] <20031231234733.13536.dbaron@dbaron.org>
                   ` (3 preceding siblings ...)
  2004-01-04  9:25 ` pinskia at gcc dot gnu dot org
@ 2004-01-04  9:36 ` steven at gcc dot gnu dot org
  2004-01-04 22:42 ` mmitchel at gcc dot gnu dot org
  2004-01-04 22:42 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-04  9:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-01-04 09:36 -------
This hunk of the patch to parser.c causes the problem:  
30a31,47  
> @@ -10900,6 +10905,16 @@  
>        bool saved_default_arg_ok_p = parser->default_arg_ok_p;  
>        parser->default_arg_ok_p = false;  
>  
> +      /* After seeing a decl-specifier-seq, if the next token is not a  
> +      "(", there is no possibility that the code is a valid  
> +      expression initializer.  Therefore, if parsing tentatively,  
> +      we commit at this point.  */  
> +      if (!parser->in_template_argument_list_p  
> +       && cp_parser_parsing_tentatively (parser)  
> +       && !cp_parser_committed_to_tentative_parse (parser)  
> +       && cp_lexer_next_token_is_not (parser->lexer, CPP_OPEN_PAREN))  
> +     cp_parser_commit_to_tentative_parse (parser);  
> +      /* Parse the declarator.  */  
>        declarator = cp_parser_declarator (parser,  
>                                        CP_PARSER_DECLARATOR_EITHER,  
>                                        /*ctor_dtor_or_conv_p=*/NULL,  
  
Making this P1 since it's a regression and a rejects-valid bug.  
  
Assigned to Mark since this was his patch.  
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mmitchel at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13536


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast
       [not found] <20031231234733.13536.dbaron@dbaron.org>
                   ` (4 preceding siblings ...)
  2004-01-04  9:36 ` steven at gcc dot gnu dot org
@ 2004-01-04 22:42 ` mmitchel at gcc dot gnu dot org
  2004-01-04 22:42 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-01-04 22:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-01-04 22:42 -------
Fixed in GCC 3.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13536


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast
       [not found] <20031231234733.13536.dbaron@dbaron.org>
                   ` (5 preceding siblings ...)
  2004-01-04 22:42 ` mmitchel at gcc dot gnu dot org
@ 2004-01-04 22:42 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-04 22:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-04 22:42 -------
Subject: Bug 13536

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-01-04 22:42:22

Modified files:
	gcc/cp         : ChangeLog call.c parser.c 
	gcc/testsuite  : ChangeLog 
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/testsuite/27_io/basic_filebuf: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_fstream: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_ifstream: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_ios: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_iostream: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_istream: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_istringstream: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_ofstream: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_ostream: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_ostringstream: 4.cc 
	libstdc++-v3/testsuite/27_io/basic_stringbuf: 5.cc 
	libstdc++-v3/testsuite/27_io/basic_stringstream: 4.cc 
Added files:
	gcc/testsuite/g++.dg/init: copy7.C 
	gcc/testsuite/g++.dg/parse: cast1.C 

Log message:
	PR c++/12226
	* call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
	(reference_binding): Set it when appropriate.
	(build_temp): New function, split out from ...
	(convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
	(initialize_reference): Likewise.
	
	PR c++/12226
	* g++.dg/init/copy7.c: New test.
	
	PR c++/12226
	* testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
	constructor.
	* testsuite/27_io/basic_fstream/4.cc: Likewise.
	* testsuite/27_io/basic_ifstream/4.cc: Likewise.
	* testsuite/27_io/basic_ios/4.cc: Likewise.
	* testsuite/27_io/basic_iostream/4.cc: Likewise.
	* testsuite/27_io/basic_istream/4.cc: Likewise.
	* testsuite/27_io/basic_istingstream/4.cc: Likewise.
	* testsuite/27_io/basic_ofstream/4.cc: Likewise.
	* testsuite/27_io/basic_ostream/4.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/4.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/5.cc: Likewise.
	* testsuite/27_io/basic_stringstream/4.cc: Likewise.
	
	PR c++/13536
	* parser.c (cp_parser): Add in_type_id_in_expr_p.
	(cp_parser_new): Initialize it.
	(cp_parser_postfix_expression): Set it.
	(cp_parser_sizeof_operand): Likewise.
	(cp_parser_parameteR_declaration): Do not commit early to tenative
	parsers when in_type_id_in_expr_p is set.
	
	PR c++/13536
	* g++.dg/parse/cast1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3848&r2=1.3849
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.447&r2=1.448
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.143&r2=1.144
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3331&r2=1.3332
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/copy7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/cast1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2193&r2=1.2194
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_fstream/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_ifstream/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_ios/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_iostream/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_istream/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_istringstream/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_ofstream/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_ostream/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_ostringstream/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/5.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringstream/4.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13536


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-01-04 22:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20031231234733.13536.dbaron@dbaron.org>
2004-01-01  0:39 ` [Bug c++/13536] [3.4 regression] parse error when parenthesized construction-style cast contains old-style cast pinskia at gcc dot gnu dot org
2004-01-01  0:39 ` pinskia at gcc dot gnu dot org
2004-01-01 12:29 ` lerdsuwa at gcc dot gnu dot org
2004-01-04  9:25 ` pinskia at gcc dot gnu dot org
2004-01-04  9:36 ` steven at gcc dot gnu dot org
2004-01-04 22:42 ` mmitchel at gcc dot gnu dot org
2004-01-04 22:42 ` cvs-commit at gcc dot gnu dot org

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).