From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7717 invoked by alias); 6 Mar 2012 08:57:52 -0000 Received: (qmail 7691 invoked by uid 22791); 6 Mar 2012 08:57:49 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_CP X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Mar 2012 08:57:36 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id E471829003E; Tue, 6 Mar 2012 09:57:35 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HvKtlFK0lThd; Tue, 6 Mar 2012 09:57:35 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 9D423290011; Tue, 6 Mar 2012 09:57:35 +0100 (CET) Subject: Re: Remove obsolete Tru64 UNIX V5.1B support Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=windows-1252 From: Tristan Gingold In-Reply-To: Date: Tue, 06 Mar 2012 08:57:00 -0000 Cc: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, Richard Henderson , "Joseph S. Myers" , Bruce Korb , Arnaud Charlet Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Rainer Orth Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2012-q1/txt/msg00029.txt.bz2 Rainer, On Mar 5, 2012, at 6:14 PM, Rainer Orth wrote: > The Tru64 UNIX V5.1 port has been obsoleted in GCC 4.7, and it's now > time to remove it from mainline. The following patch does just that, > and should be mostly uncontroversial, like removing target-specific > fixincludes hacks, files, and testsuite support. >=20 > Then, there are target-specific features only used by this port (like > support for #pragma extern_prefix), [=85] > * As I've mentioned, I've ripped out the #pragma extern_prefix support: > while VMS has something similar, it doesn't use the common code. in fact VMS use some of the already existing #pragma extern_prefix support.= You're removing too much code here ! Commenting only the relevant part: > diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c > --- a/gcc/c-family/c-cppbuiltin.c > +++ b/gcc/c-family/c-cppbuiltin.c > @@ -1,6 +1,6 @@ > /* Define builtin-in macros for the C family front ends. > - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2= 011 > - Free Software Foundation, Inc. > + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, > + 2011, 2012 Free Software Foundation, Inc. >=20=20 > This file is part of GCC. >=20=20 > @@ -886,9 +886,6 @@ c_cpp_builtins (cpp_reader *pfile) > /* Show the availability of some target pragmas. */ > cpp_define (pfile, "__PRAGMA_REDEFINE_EXTNAME"); >=20=20 > - if (targetm.handle_pragma_extern_prefix) > - cpp_define (pfile, "__PRAGMA_EXTERN_PREFIX"); VMS doesn't reference this macro, so you could remove it. > - > /* Make the choice of the stack protector runtime visible to source co= de. > The macro names and values here were chosen for compatibility with = an > earlier implementation, i.e. ProPolice. */ > diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c > --- a/gcc/c-family/c-pragma.c > +++ b/gcc/c-family/c-pragma.c > @@ -1,6 +1,6 @@ > /* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma = pack. > Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2= 005, > - 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. > + 2006, 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc. >=20=20 > This file is part of GCC. >=20=20 > @@ -369,37 +369,26 @@ handle_pragma_weak (cpp_reader * ARG_UNU > } > } >=20=20 > -/* GCC supports two #pragma directives for renaming the external > +/* GCC supports a #pragma directive for renaming the external > symbol associated with a declaration (DECL_ASSEMBLER_NAME), for > - compatibility with the Solaris and Tru64 system headers. GCC also > + compatibility with the Solaris system headers. GCC also > has its own notation for this, __asm__("name") annotations. >=20=20 > Corner cases of these features and their interaction: >=20=20 > - 1) Both pragmas silently apply only to declarations with external > + 1) The pragma silently applies only to declarations with external > linkage (that is, TREE_PUBLIC || DECL_EXTERNAL). Asm labels > do not have this restriction. >=20=20 > - 2) In C++, both #pragmas silently apply only to extern "C" declaratio= ns. > + 2) In C++, the #pragma silently applies only to extern "C" declaratio= ns. > Asm labels do not have this restriction. >=20=20 > - 3) If any of the three ways of changing DECL_ASSEMBLER_NAME is > + 3) If any of the two ways of changing DECL_ASSEMBLER_NAME is > applied to a decl whose DECL_ASSEMBLER_NAME is already set, and the > new name is different, a warning issues and the name does not chan= ge. >=20=20 > 4) The "source name" for #pragma redefine_extname is the DECL_NAME, > - *not* the DECL_ASSEMBLER_NAME. > - > - 5) If #pragma extern_prefix is in effect and a declaration occurs > - with an __asm__ name, the #pragma extern_prefix is silently > - ignored for that declaration. > - > - 6) If #pragma extern_prefix and #pragma redefine_extname apply to > - the same declaration, whichever triggered first wins, and a warning > - is issued. (We would like to have #pragma redefine_extname always > - win, but it can appear either before or after the declaration, and > - if it appears afterward, we have no way of knowing whether a modif= ied > - DECL_ASSEMBLER_NAME is due to #pragma extern_prefix.) */ > + *not* the DECL_ASSEMBLER_NAME. */ I think the comments would still apply. >=20=20 > typedef struct GTY(()) pending_redefinition_d { > tree oldname; > @@ -494,30 +483,6 @@ add_to_renaming_pragma_list (tree oldnam > p->newname =3D newname; > } >=20=20 > -/* The current prefix set by #pragma extern_prefix. */ > -GTY(()) tree pragma_extern_prefix; This variable is referenced by gcc/config/vms/vms-c.c, so it shouldn't be r= emoved. > - > -/* #pragma extern_prefix "prefix" */ > -static void > -handle_pragma_extern_prefix (cpp_reader * ARG_UNUSED (dummy)) > -{ > - tree prefix, x; > - enum cpp_ttype t; > - > - if (pragma_lex (&prefix) !=3D CPP_STRING) > - GCC_BAD ("malformed #pragma extern_prefix, ignored"); > - t =3D pragma_lex (&x); > - if (t !=3D CPP_EOF) > - warning (OPT_Wpragmas, "junk at end of %<#pragma extern_prefix%>"); > - > - if (targetm.handle_pragma_extern_prefix) > - /* Note that the length includes the null terminator. */ > - pragma_extern_prefix =3D (TREE_STRING_LENGTH (prefix) > 1 ? prefix := NULL); > - else if (warn_unknown_pragmas > in_system_header) > - warning (OPT_Wunknown_pragmas, > - "#pragma extern_prefix not supported on this target"); > -} > - Currently, the #pragma __extern_prefix is handled by vms-c.c, which is slig= htly more powerful than the tru64 version. It would be easier to me if the above version were removed! > /* Hook from the front ends to apply the results of one of the preceding > pragmas that rename variables. */ >=20=20 > @@ -580,35 +545,12 @@ maybe_apply_renaming_pragma (tree decl,=20 > return asmname; > } >=20=20 > - /* Otherwise we use what we've got; #pragma extern_prefix is > - silently ignored. */ > + /* Otherwise we use what we've got. */ > return build_string (IDENTIFIER_LENGTH (newname), > IDENTIFIER_POINTER (newname)); > } >=20=20 > - /* If we've got an asmname, #pragma extern_prefix is silently ignored.= */ > - if (asmname) > - return asmname; > - > - /* If #pragma extern_prefix is in effect, apply it. */ > - if (pragma_extern_prefix) > - { > - const char *prefix =3D TREE_STRING_POINTER (pragma_extern_prefix); > - size_t plen =3D TREE_STRING_LENGTH (pragma_extern_prefix) - 1; > - > - const char *id =3D IDENTIFIER_POINTER (DECL_NAME (decl)); > - size_t ilen =3D IDENTIFIER_LENGTH (DECL_NAME (decl)); > - > - char *newname =3D (char *) alloca (plen + ilen + 1); > - > - memcpy (newname, prefix, plen); > - memcpy (newname + plen, id, ilen + 1); > - > - return build_string (plen + ilen, newname); > - } > - > - /* Nada. */ > - return 0; > + return asmname; > } So this code shouldn't be removed because vms-c.c set pragma_extern_prefix. > @@ -1396,7 +1338,6 @@ init_pragma (void) >=20=20 > c_register_pragma_with_expansion (0, "redefine_extname", > handle_pragma_redefine_extname); > - c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix); Agreed as discussed above. > c_register_pragma_with_expansion (0, "message", handle_pragma_message); >=20=20 > diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h > --- a/gcc/c-family/c-pragma.h > +++ b/gcc/c-family/c-pragma.h > @@ -1,6 +1,6 @@ > /* Pragma related interfaces. > Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, > - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. > + 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc. >=20=20 > This file is part of GCC. >=20=20 > @@ -146,6 +146,4 @@ extern enum cpp_ttype c_lex_with_flags ( >=20=20 > extern void c_pp_lookup_pragma (unsigned int, const char **, const char = **); >=20=20 > -extern GTY(()) tree pragma_extern_prefix; > - > #endif /* GCC_C_PRAGMA_H */ Shouldn't be removed too. Thank you Rainer for all the Tru64 maintainership work! Tristan.