From patchwork Mon Nov 2 16:52:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 1392380 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=QsUIvVyL; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CPzV20yYpz9sVV for ; Tue, 3 Nov 2020 03:52:09 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 537A6388A400; Mon, 2 Nov 2020 16:52:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by sourceware.org (Postfix) with ESMTPS id 4072C3836C09 for ; Mon, 2 Nov 2020 16:52:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4072C3836C09 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nathanmsidwell@gmail.com Received: by mail-qv1-xf32.google.com with SMTP id da2so4209463qvb.0 for ; Mon, 02 Nov 2020 08:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=kIorMyrxHhDhnYW9POam2wIG/7oiWWiQHTho969/PlU=; b=QsUIvVyLIaLuGjFiolIOg1EMoNzbX3P6n6Ebpvxt4w9ymnQTyVeJR70iqSmstLwX2f 5tB9zZ2um9Mvp8AOoH53TtjT0o/ewgWxVv0oYGcvKqN5yNuuPxPcLDC9d0QRZAj/P/O1 LVDDkbdquo3w8E2FL4r4C5Mz3gQlCOL6S63JkNrLwwNn403qMHlVJiRVXeneNPu9BndG ipc1eXoVHxeZ/1/xN/d5NZi6tlhAvkE2RtrT7jxpe2hGd2ZK0Kk9RHXHOJrxZlOtVgDy GSQDf1MzaLYEQpFxCoA21LaAl96JEr1LGcu8L/M/BDkPPOwO0Aj+rhtxy4M7TingNaIp mfog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:from:subject:message-id:date :user-agent:mime-version:content-language; bh=kIorMyrxHhDhnYW9POam2wIG/7oiWWiQHTho969/PlU=; b=BTJM4Q0h3mkN+5hNu2WanOsDzdUVXBmmqDwSFKY1f/hiMxXRDLxrS2gVrDzGxKcK7n e/yw4g/9jvcUFHYnArXrrdYpJ1GhUTgeIIz3gg0nFkgkwo43u/zlNUWakxH362YydGmf iHqApGXmEYytilJAUyUbG5sA9+TokrcR5Oo1j/f3I9w1G+maX0w73RBlrwLgm2akd6DD M6Pn1/hiXrI2vuf5pMD85tbCIp+ugaUYh9S/ZGTgaA45nKZ9WH42vB/EXUPzxYXQquzN /Mn8JLsi6lyXnFvH++ea8Qj02DfYVSoiYanntt9XYIqhXLx7v0HVH0QihKHC0UAHKhxX m4vA== X-Gm-Message-State: AOAM532F8IpZ0pLPChU8N2OfC5Z54Nuh/QMA4Ag92rtTKMzYnYDZMral TLyK58JhfOosMQSKeP9LwBzamhvTm0Cptg== X-Google-Smtp-Source: ABdhPJzdCinyzJtiBZCAjKMvuwrKA3mAhfA3Y4ab149lfYTYMWMVi4S9ZhQGD5BCTbVwNGEWufekqA== X-Received: by 2002:a0c:bd07:: with SMTP id m7mr9987003qvg.34.1604335924754; Mon, 02 Nov 2020 08:52:04 -0800 (PST) Received: from [172.30.21.184] ([163.114.130.5]) by smtp.googlemail.com with ESMTPSA id k11sm1692722qtu.45.2020.11.02.08.52.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 08:52:02 -0800 (PST) To: GCC Patches From: Nathan Sidwell Subject: options: Tiny refactor Message-ID: <067283e2-48cd-5e69-4a53-b3c4c3c08936@acm.org> Date: Mon, 2 Nov 2020 11:52:00 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Language: en-US X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, 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-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" This changes more on the modules branch, but let's move the declaration to the initializer now. gcc/c-family/ * c-opts.c (c_common_post_options): Move var decl to its initialization point. pushing to trunk diff --git i/gcc/c-family/c-opts.c w/gcc/c-family/c-opts.c index 120f4489f6c..0698e58a335 100644 --- i/gcc/c-family/c-opts.c +++ w/gcc/c-family/c-opts.c @@ -752,8 +752,6 @@ default_handle_c_option (size_t code ATTRIBUTE_UNUSED, bool c_common_post_options (const char **pfilename) { - struct cpp_callbacks *cb; - /* Canonicalize the input and output filenames. */ if (in_fnames == NULL) { @@ -1105,7 +1103,7 @@ c_common_post_options (const char **pfilename) input_location = UNKNOWN_LOCATION; } - cb = cpp_get_callbacks (parse_in); + struct cpp_callbacks *cb = cpp_get_callbacks (parse_in); cb->file_change = cb_file_change; cb->dir_change = cb_dir_change; cpp_post_options (parse_in);