aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@gcc.gnu.org>2003-06-10 18:32:57 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2003-06-10 18:32:57 +0000
commitd192828ab610545ea373b5791fecbe6ba083c31d (patch)
treed2cf3b2787ee242a4fd2bb22945e77dec333dccf /gcc/cp
parent4db8f48acab5d9a6a2dc06ed132c78820f2df326 (diff)
downloadgcc-d192828ab610545ea373b5791fecbe6ba083c31d.zip
gcc-d192828ab610545ea373b5791fecbe6ba083c31d.tar.gz
gcc-d192828ab610545ea373b5791fecbe6ba083c31d.tar.bz2
[multiple changes]
2003-06-10 Andrew Pinski <pinskia@physics.uc.edu> * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY. (start_cleanup_cnt): New. 2003-06-10 Geoffrey Keating <geoffk@apple.com> * g++.dg/pch/static-1.C: New file. * g++.dg/pch/static-1.Hs: New file. From-SVN: r67719
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0de9c7b..155a2f1 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
+ (start_cleanup_cnt): New.
+
2003-06-10 Mark Mitchell <mark@codesourcery.com>
PR c++/11131
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 1807d05..1340640 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8347,10 +8347,11 @@ get_dso_handle_node (void)
/* Begin a new function with internal linkage whose job will be simply
to destroy some particular variable. */
+static GTY(()) int start_cleanup_cnt;
+
static tree
start_cleanup_fn (void)
{
- static int counter = 0;
int old_interface_only = interface_only;
int old_interface_unknown = interface_unknown;
char name[32];
@@ -8377,7 +8378,7 @@ start_cleanup_fn (void)
/* Build the function type itself. */
fntype = build_function_type (void_type_node, parmtypes);
/* Build the name of the function. */
- sprintf (name, "__tcf_%d", counter++);
+ sprintf (name, "__tcf_%d", start_cleanup_cnt++);
/* Build the function declaration. */
fndecl = build_lang_decl (FUNCTION_DECL, get_identifier (name), fntype);
/* It's a function with internal linkage, generated by the