This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix PR c++/30582: Trouble with __builtin_offsetof and volatile


Volker Reichelt <v.reichelt@netcologne.de> writes:

> Bootstrapped and regtested on i686-pc-linux-gnu.
> Ok for mainline, 4.2 branch, and 4.1 branch?

4.1 branch is quite different.

../../gcc/c-common.c: In function 'fold_offsetof_1':
../../gcc/c-common.c:6006: error: 'stop_ref' undeclared (first use in this function)
../../gcc/c-common.c:6006: error: (Each undeclared identifier is reported only once
../../gcc/c-common.c:6006: error: for each function it appears in.)
../../gcc/c-common.c:6006: error: too many arguments to function 'fold_offsetof_1'
make[2]: *** [c-common.o] Error 1

Andreas.

2007-03-08  Andreas Schwab  <schwab@suse.de>

	* c-common.c (fold_offsetof_1): Remove extra argument in recursive
	call.

Index: gcc/c-common.c
===================================================================
--- gcc/c-common.c	(revision 122690)
+++ gcc/c-common.c	(working copy)
@@ -1,6 +1,6 @@
 /* Subroutines shared by all languages that are variants of C.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -6003,7 +6003,7 @@ fold_offsetof_1 (tree expr)
       /* Handle static members of volatile structs.  */
       t = TREE_OPERAND (expr, 1);
       gcc_assert (TREE_CODE (t) == VAR_DECL);
-      return fold_offsetof_1 (t, stop_ref);
+      return fold_offsetof_1 (t);
 
     default:
       gcc_unreachable ();

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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