From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95903 invoked by alias); 30 May 2019 20:51:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 95895 invoked by uid 89); 30 May 2019 20:51:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Received:99c7, HX-Spam-Relays-External:209.85.210.195, H*RU:209.85.210.195, H*r:sk:mail-pf X-HELO: mail-pf1-f195.google.com Received: from mail-pf1-f195.google.com (HELO mail-pf1-f195.google.com) (209.85.210.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 May 2019 20:50:58 +0000 Received: by mail-pf1-f195.google.com with SMTP id u22so4709702pfm.3 for ; Thu, 30 May 2019 13:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=TofEbMTl2nHlIgr4f69nIDM6F7N/wTgP+19DdHBHNNE=; b=okKOo/+eO13iBoS2vIkPOXFoUdUdmICuiBVEicuKLbmZjd5Ckk4XhAxTCo64z9tYJ7 /FLAso2IYNf3XyyBx9IK25WYs/Rg81lAPY8PRfjwz2850MtO/2ph6W7jxOlW784ExYKm PzAuKna/nkGF/5FQwoKsSYLOE1FQuA2swpRwHy25azaMFt/79lGqcwCIItspkZBTkODV xnYrDdOVyXMUQ6LayLXxBBqlQGCDQCglPBYLk+JzBqh+uRMoT3QyebEdSpk9aMY/o32R 1GF9i29Lb47deelHWqfsybfjl7bKpdgTz3mWojPXpSRSyws0zDNJiByQ/YS9v4k5tvBt 96Pw== Return-Path: Received: from localhost ([2601:647:5180:35d7::63e5]) by smtp.gmail.com with ESMTPSA id l102sm2033323pjb.10.2019.05.30.13.50.55 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 May 2019 13:50:56 -0700 (PDT) From: Michael Forney To: gcc-patches@gcc.gnu.org Subject: [PATCH] libiberty: Don't use VLAs if __STDC_NO_VLA__ is non-zero Date: Thu, 30 May 2019 20:54:00 -0000 Message-Id: <20190530205055.21215-1-mforney@mforney.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-05/txt/msg02058.txt.bz2 VLAs are optional in C11, and an implementation that does not support them will define __STDC_NO_VLA__ to 1. 2019-05-30 Michael Forney * cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__ is non-zero. --- libiberty/cp-demangle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 4e5b733b548..aa78c86dd44 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -192,9 +192,9 @@ static void d_init_info (const char *, int, size_t, struct d_info *); #else #ifdef __STDC__ #ifdef __STDC_VERSION__ -#if __STDC_VERSION__ >= 199901L +#if __STDC_VERSION__ >= 199901L && !__STDC_NO_VLA__ #define CP_DYNAMIC_ARRAYS -#endif /* __STDC__VERSION >= 199901L */ +#endif /* __STDC_VERSION__ >= 199901L && !__STDC_NO_VLA__ */ #endif /* defined (__STDC_VERSION__) */ #endif /* defined (__STDC__) */ #endif /* ! defined (__GNUC__) */ -- 2.20.1