From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by sourceware.org (Postfix) with ESMTPS id D1FD63938C25 for ; Wed, 6 May 2020 16:44:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D1FD63938C25 Received: by mail-io1-xd30.google.com with SMTP id c2so2818997iow.7 for ; Wed, 06 May 2020 09:44:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fLzudtNE7BOhrctzwNRf5ls84w3hnibEC/s83P0Sqj4=; b=rVrGp7ya8WTksFHZ/nTlmGhVyyujmkHQSr9rCtBMxZ4luq/+LDMg4ViXHQpNR+5s8U GHHBSyZrTbG3TAeqqP3INz2aKQzemL1admiR/2OvuCSF5WGQ+pA3kvYJPQD5HVYDwMry BqwHUjxJ8R/I5rava1RCqzdb0R8p8kiuVasQFgMfa9hU+uBtXSTYA+n/DIlPwssJ9fZd c4cJ10v778W0z/MaJeosam5bYZ8kEEKPh06j14gJ4DKUb7YPSFxGPDULSMc2Fr5T/V9C K4/YHIrAB15izkNvjDdXXyI1F8+IoYk/6PyiRJNlWSsPbfGcRuB9VU51bvEXu6EHJVlC SRJA== X-Gm-Message-State: AGi0Pub3eWMeM/8MFcXouKhmKGtBS3ujZLdnGYfZ/KcJO0jxI0y5kLW4 dXiFIbuG87Q1rQy+Y77UP3pWgxdHW5QqQSdAuWg= X-Google-Smtp-Source: APiQypIwAbz5885XYZN/LOfowuIUMj3hTFLLCUgeu7xr+Czus7gsXCtXjxmoHm6OKpsE278gU+adBsalLyWVXN3KQ44= X-Received: by 2002:a5d:8f98:: with SMTP id l24mr9476058iol.172.1588783443252; Wed, 06 May 2020 09:44:03 -0700 (PDT) MIME-Version: 1.0 References: <85dcd761-ff53-3c38-06c5-538af59bc744@gmx.de> <81bd3c81-6afb-eb82-9ad8-e8b58a48f53c@gmx.de> In-Reply-To: <81bd3c81-6afb-eb82-9ad8-e8b58a48f53c@gmx.de> From: Jonathan Wakely Date: Wed, 6 May 2020 17:43:52 +0100 Message-ID: Subject: Re: -fanalyzer triggers on empty vector of strings and foreach loop To: andre maute Cc: gcc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2020 16:44:05 -0000 On Sat, 2 May 2020 at 18:21, andre maute wrote: > > On 5/2/20 1:24 PM, Jonathan Wakely wrote: > > On Fri, 1 May 2020 at 23:59, andre maute wrote: > >> > >> I wonder if this is expected behavior > > > > It's a known limitation that the analyzer doesn't support C++ yet. > > > > So nevertheless should these two be filed as bugs? No thank you. > The first being the iteration over the empty vector. The analyzer dev says "it's not worth trying -fanalyzer with C++ at this point. Hopefully GCC 11." > The second the one for the warning flag given by the output of -fanalyzer > but which doesn't trigger anything if used alone. That's expected, -Wanalyzer-null-dereference requires -fanalyzer to do anything. > Regards > Andre