From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13377 invoked by alias); 15 Nov 2012 09:01:30 -0000 Received: (qmail 13366 invoked by uid 22791); 15 Nov 2012 09:01:27 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Nov 2012 09:01:21 +0000 Received: from md14.u-strasbg.fr (md14.u-strasbg.fr [130.79.200.249]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAF91J84012223 for ; Thu, 15 Nov 2012 10:01:19 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms11.u-strasbg.fr [130.79.204.111]) by md14.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAF91Jxj014751 for ; Thu, 15 Nov 2012 10:01:19 +0100 Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAF91IQb032667 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 15 Nov 2012 10:01:18 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [RFC] ARI related: Use of GCC poison pragma Date: Thu, 15 Nov 2012 09:01:00 -0000 Message-ID: <009b01cdc30f$c7684e80$5638eb80$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00030.txt.bz2 To avoid resurgence of expunged ARI problems, Pedro suggested the use of GCC poison pragma. The problem is that I have no experience with that kind of code. I looked into the gcc source, and there seems to be a huge list of forbidden macros and functions inside gcc/system.h header. Small extract of gcc-4.3.1 source: #if (GCC_VERSION >= 3000) /* Note autoconf checks for prototype declarations and includes system.h while doing so. Only poison these tokens if actually compiling gcc, so that the autoconf declaration tests for malloc etc don't spuriously fail. */ #ifdef IN_GCC #undef calloc #undef strdup #pragma GCC poison calloc strdup #if !defined(FLEX_SCANNER) && !defined(YYBISON) #undef malloc #undef realloc #pragma GCC poison malloc realloc #endif /* Old target macros that have moved to the target hooks structure. */ #pragma GCC poison ASM_OPEN_PAREN ASM_CLOSE_PAREN \ FUNCTION_PROLOGUE FUNCTION_EPILOGUE \ FUNCTION_END_PROLOGUE FUNCTION_BEGIN_EPILOGUE \ What would be the corresponding gdb file? I suppose it would be defs.h So would a patch adding #if (GCC_VERSION >= 3000) #pragma GCC poison xvasprintf #endif (and probably lots of other functions aand macros) be an acceptable way to introduce these poisons? Pierre Muller as ARI maintainer