From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12151 invoked by alias); 18 Jun 2018 12:37:47 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43055 Received: (qmail 15416 invoked by uid 1010); 18 Jun 2018 12:37:47 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f67.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.82.67):SA:0(-1.9/5.0):. Processed in 1.78591 secs); 18 Jun 2018 12:37:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SufLRGysc310OI4YJlYTtwG3LoLuYIOmrQOp+nIk9c0=; b=VXB2Mm3QXnWRjQF6QsxkhGDLeLWoPWQ7VY2+9MIGkzjAymYBh79ftm5w9o86Hbim2P FUWZzUikIqiC7IK7VVoADIolS0AH+oKR5v90PUYnAjQOesOtQzZMAuX5GuHAd5NFwFO4 u7QnT9mh4h2tb5ncVmZze4hWmpcZak7srdGZoVAsY/0n6ZZU5pMwhPt8ylb10XTrZPE8 Iy/TsuIgwN6/PcIcMYS2xBkNHBuQqHxXaapjwkB7Aw6e+7iTDlcsqEVcZ35ObRGrfIhA 11lfgAqGF0mAd9tHVvj8PMiVdo+bSdcO4pplFbaGEVeqWiWfYswqg8Bu9OU8XGe2y4sK q0Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SufLRGysc310OI4YJlYTtwG3LoLuYIOmrQOp+nIk9c0=; b=QdGlIq3/e2N0Wt70P97v+nFC/3rWMxi+ruux+OFo/9vJ58kWKGkvI/XDljsbDr7S0u AuqVoAs8XlbO/qnH/KaKyuZrXk2/1IDpki4ceTptbD0Pz71rshyLLWUaTmTR3LzcZ9SU BUN8asKEbYwqS9eAOSMeg+fknFtaZ3nDBtA+RePD5Ii4R0PPOf0rPL1zQ2LbfYhv3LX2 IxLyxffuqe591Is/jCogl0c3fSom2oTdDT2DLQhJl5iIwpdBXXj7ZflZ7miWsZAhnLlo mWCeLag1qlbLbQAPMQil08vwDXjZfT8vQOdnBmNG9YOHWmZJytPN+PnPYY4DJCgBXdiP fBmg== X-Gm-Message-State: APt69E0jtMw+nxdpgqZJHAbs+VfIeBGqm4emOyMlQCsfM7XE23TFPGWd cP3xJ+q9ncrOI8W1YxFv4AzqKmIfxh0KkGOBkuc= X-Google-Smtp-Source: ADUXVKIL3HQ6+ZKReo6ZaPasuYqQsycnSyk5VzJrT5IEwUM8DRfo5uvg+LLEKGEa4WIE8v8Jnf5fQFULHk/b13VPHpY= X-Received: by 2002:a50:de0c:: with SMTP id z12-v6mr11114716edk.245.1529325461915; Mon, 18 Jun 2018 05:37:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20180618051446.69512-1-lists@eitanadler.com> From: Mikael Magnusson Date: Mon, 18 Jun 2018 14:37:41 +0200 Message-ID: Subject: Re: [PATCH] _gcc: Improve completer for _clang and _gcc To: Eitan Adler Cc: zsh workers Content-Type: text/plain; charset="UTF-8" On Mon, Jun 18, 2018 at 9:49 AM, Eitan Adler wrote: > On 18 June 2018 at 00:44, Mikael Magnusson wrote: >> On Mon, Jun 18, 2018 at 7:14 AM, Eitan Adler wrote: >>> clang - add additional sanitizers >>> both - add additional standards (basically, aliases) >>> both - fix -flto >>> >>> Signed-off-by: Eitan Adler >>> --- >>> Completion/Unix/Command/_gcc | 22 ++++++++++++++++++---- >>> 1 file changed, 18 insertions(+), 4 deletions(-) >>> >>> diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc >>> index a552bb2db..9690df79f 100644 >>> --- a/Completion/Unix/Command/_gcc >>> +++ b/Completion/Unix/Command/_gcc >>> @@ -338,16 +338,31 @@ h8/300) >>> ;; >>> esac >>> >>> +local -a sanitizers >>> if [[ "$service" = clang* ]]; then >>> args=( >>> $args >>> - -flto -emit-llvm >>> + "-flto=-[generate output files suitable for link time optimization]::style:(full thin)" >>> + -emit-llvm >>> "-Qunused-arguments[don't emit warning for unused driver arguments]" >>> --analyze >>> -fshow-column -fshow-source-location -fcaret-diagnostics -fdiagnostics-fixit-info >>> -fdiagnostics-parseable-fixits -fdiagnostics-print-source-range-info >>> -fprint-source-range-info -fdiagnostics-show-option -fmessage-length >>> ) >>> + sanitizers=( >>> + address alignment bool bounds enum float-cast-overflow float-divide-by-zero >>> + integer-divide-by-zero memory nonnull-attribute null nullability-arg nullability-assign >>> + nullability-return object-size pointer-overflow return unsigned-integer-overflow >>> + returns-nonnull-attribute shift signed-integer-overflow unreachable vla-bound vptr >> >> Did you mean to add this list under the gcc case? > > No. Those are the list supported by clang. I didn't do a full audit, > but gcc supports fewer of them. It may support more than the list I > included, but this is not a regression. > > Its hard to test gcc since it just errors out with "/usr/local/bin/ld: > cannot find -lubsan" when testing and I don't want to go down the > rabbit hole of debugging that right now. Well, you remove "thread" and add "memory" instead for gcc, and the manpage does list all values supported by gcc. -- Mikael Magnusson