Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Unified Diff: gcc/gcc/fortran/misc.c

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/fortran/matchexp.c ('k') | gcc/gcc/fortran/module.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/fortran/misc.c
diff --git a/gcc/gcc/fortran/misc.c b/gcc/gcc/fortran/misc.c
index 136b751a196adaa77d196397aa205eab20e67e12..b5e6275bc8d0df485029effe55d4471427fd95ac 100644
--- a/gcc/gcc/fortran/misc.c
+++ b/gcc/gcc/fortran/misc.c
@@ -42,22 +42,15 @@ gfc_getmem (size_t n)
}
-/* gfortran.h defines free to something that triggers a syntax error,
- but we need free() here. */
-
-#define temp free
-#undef free
-
void
gfc_free (void *p)
{
+ /* The parentheses around free are needed in order to call not
+ the redefined free of gfortran.h. */
if (p != NULL)
- free (p);
+ (free) (p);
}
-#define free temp
-#undef temp
-
/* Get terminal width. */
@@ -74,9 +67,9 @@ void
gfc_clear_ts (gfc_typespec *ts)
{
ts->type = BT_UNKNOWN;
- ts->derived = NULL;
+ ts->u.derived = NULL;
ts->kind = 0;
- ts->cl = NULL;
+ ts->u.cl = NULL;
ts->interface = NULL;
/* flag that says if the type is C interoperable */
ts->is_c_interop = 0;
@@ -137,6 +130,9 @@ gfc_basic_typename (bt type)
case BT_DERIVED:
p = "DERIVED";
break;
+ case BT_CLASS:
+ p = "CLASS";
+ break;
case BT_PROCEDURE:
p = "PROCEDURE";
break;
@@ -190,7 +186,11 @@ gfc_typename (gfc_typespec *ts)
sprintf (buffer, "HOLLERITH");
break;
case BT_DERIVED:
- sprintf (buffer, "TYPE(%s)", ts->derived->name);
+ sprintf (buffer, "TYPE(%s)", ts->u.derived->name);
+ break;
+ case BT_CLASS:
+ sprintf (buffer, "CLASS(%s)",
+ ts->u.derived->components->ts.u.derived->name);
break;
case BT_PROCEDURE:
strcpy (buffer, "PROCEDURE");
« no previous file with comments | « gcc/gcc/fortran/matchexp.c ('k') | gcc/gcc/fortran/module.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698