Bug 35742 - [4.3 regression] Broken diagnostic: 'goto_expr' not supported by pp_c_expression
Summary: [4.3 regression] Broken diagnostic: 'goto_expr' not supported by pp_c_expression
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.4.0
: P2 normal
Target Milestone: 4.3.5
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic, monitored
Depends on: 35441
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-28 20:01 UTC by Volker Reichelt
Modified: 2010-04-20 13:52 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.0.4 4.4.0
Known to fail: 4.2.0 4.3.0 4.1.2
Last reconfirmed: 2008-03-30 20:56:09


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2008-03-28 20:01:42 UTC
A broken diagnostic is issued for the following invalid code snippet
since GCC 4.1.0:

=========================================
void foo()
{
  for (;;)
    ({break;})();
}
=========================================

#'goto_expr' not supported by pp_c_expression#'bug.c: In function 'foo':
bug.c:4: error: called object  is not a function
Comment 1 Andrew Pinski 2008-03-30 20:56:09 UTC
Confirmed.
Comment 2 Joseph S. Myers 2008-07-04 22:41:07 UTC
Closing 4.1 branch.
Comment 3 Jakub Jelinek 2009-01-09 16:47:05 UTC
Subject: Bug 35742

Author: jakub
Date: Fri Jan  9 16:46:47 2009
New Revision: 143209

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143209
Log:
	PR c/35742
	* c-pretty-print.c (pp_c_expression): Handle GOTO_EXPR like
	BIND_EXPR.

	* gcc.dg/pr35742.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr35742.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-pretty-print.c
    trunk/gcc/testsuite/ChangeLog

Comment 4 Jakub Jelinek 2009-01-09 16:53:00 UTC
Fixed on the trunk.
Comment 5 Joseph S. Myers 2009-03-31 20:49:59 UTC
Closing 4.2 branch.
Comment 6 Richard Biener 2009-08-04 12:29:05 UTC
GCC 4.3.4 is being released, adjusting target milestone.
Comment 7 Richard Biener 2010-04-20 13:51:48 UTC
Subject: Bug 35742

Author: rguenth
Date: Tue Apr 20 13:51:24 2010
New Revision: 158557

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158557
Log:
2010-04-20  Richard Guenther  <rguenther@suse.de>

	Backport from mainline
	2008-12-08  Jakub Jelinek  <jakub@redhat.com>
	PR c/35443
	* c-pretty-print.c (pp_c_expression): Handle BIND_EXPR.

	* gcc.dg/pr35443.c: New test.

	2009-01-09  Jakub Jelinek  <jakub@redhat.com>

	PR c/35742
	* c-pretty-print.c (pp_c_expression): Handle GOTO_EXPR like
	BIND_EXPR.

	* gcc.dg/pr35742.c: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pr35443.c
    branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pr35742.c
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/c-pretty-print.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog

Comment 8 Richard Biener 2010-04-20 13:52:14 UTC
Fixed.