From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by sourceware.org (Postfix) with ESMTPS id 08901395B467 for ; Wed, 16 Nov 2022 16:20:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 08901395B467 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x529.google.com with SMTP id 21so27357165edv.3 for ; Wed, 16 Nov 2022 08:20:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mSiVEKBNlIco9ONG+MwE+6mrUKfO5grVHijzYd7NWZA=; b=iVu2g0kYZnbTAe9Y/kD4iEhvlHiDk3XRwic866CYhdVJW3XAXGi40jfJVwXmdviA4R CRCKT0sefUQXleaODkBZz93zY5UJiLhX8Hvy5pVdYOeVxAOXIzapLdlsc1ovrBuZo/Ti o66VFO7zyARLvdB66vwrd9PcU5C23MPYYJSmudXpuJl+jlvf+kjigMS75bFD/U0ahqyD 2XxOu5molhfhXM666BiwULizu8BkBg9H5rYKmZpfftSBaOXrOGMu7LOVabkgl7BxMtLl OMEjS6hDGsBAbgCLR3sCIHMHUMD1AiS/NdrysWWoIKqQWW8Jt0fqvNaLaYd3cJFs4rtF 2PPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mSiVEKBNlIco9ONG+MwE+6mrUKfO5grVHijzYd7NWZA=; b=SIxOQwBTioCucSsuHhdOOgJZllpEBu+diSiieijBqBN8OYcaxblvgjcm1RoZjj7nUq ZhF2r3rONQ7MNafCBbsbYXtzpgiQKhN/mjjGOfm5625bh/YlkHMIYbGdWGY3pkdm/79o voUdFTAVlXz+WARrjTJ3uOl2Uc02/Hy9Ktyce6lzJ4JHXPMXKTU91qwRg4+SR8POM0gX 58kY1pYYFWYesOIolVN5KNKCUQQFrXPYRRBJwx5zcsk6za3thVxIs2LPze7btdJrPnFO A9FLVmk2BZbkc2eX42VwdTu06M/m9vD3I60LsrrTAgdj3ukYLN4xqZdIRzTzLyLAJ6Yl BYRA== X-Gm-Message-State: ANoB5pmVzo1Or9PbnrU8NAx7u2QFz/MOwwRk7rHhCIfs8vhPoD4l99C6 gvmeBHC953JAqqnUbV8WebfFg9RIa/IW/AUD2b0= X-Google-Smtp-Source: AA0mqf5Xsk0k89wsXf5hii0jndEugixDfqEN6SjKvH7kBmXslKgjn+H6kiCR3Ej6pfZ24SAzGcJDOSgnveDSmJuPwU8= X-Received: by 2002:a05:6402:360d:b0:461:b033:90ac with SMTP id el13-20020a056402360d00b00461b03390acmr19889014edb.257.1668615618652; Wed, 16 Nov 2022 08:20:18 -0800 (PST) MIME-Version: 1.0 References: <24ed5604-305a-4343-a1b6-a789e4723849@app.fastmail.com> <251923e7-57be-1611-be10-49c3067adf0d@cs.ucla.edu> <7ef0ce03-d908-649a-a6ee-89fea374d2b1@cs.ucla.edu> <9cb106e9-16ff-65ec-6a44-6567c77521dc@cs.ucla.edu> <06a5d2cd-44eb-7404-17f3-ff64dd505427@cs.ucla.edu> <27264d94-9496-d7ef-6716-f43db86f38e2@ispras.ru> <00C3EDCD-D2DA-4B0D-8A8A-08B76552D865@gentoo.org> In-Reply-To: From: Jonathan Wakely Date: Wed, 16 Nov 2022 16:20:07 +0000 Message-ID: Subject: Re: How can Autoconf help with the transition to stricter compilation defaults? To: Michael Matz Cc: Sam James , Richard Biener , Aaron Ballman , Alexander Monakov , Paul Eggert , Zack Weinberg , c-std-porting@lists.linux.dev, Autoconf Development , GCC Development , cfe-commits@lists.llvm.org, Gnulib bugs Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 16 Nov 2022 at 15:59, Michael Matz wrote: > > Hello, > > On Wed, 16 Nov 2022, Sam James wrote: > > > Unrelated but I was a bit tempted to ask for throwing in > > -Wbuiltin-declaration-mismatch to default -Werror while Clang 16 was at > > it, but I suppose we don't want the world to burn too much, > > :-) It's IMHO a bug in the standard that it misses "if any of its > associated headers are included" in the item for reservation of external > linkage identifiers; it has that for all other items about reserved > identifiers in the Library clause. If that restriction were added you > couldn't justify erroring on the example at hand (because it doesn't > include e.g. and then printf wouldn't be reserved). A warning > is of course always okay and reasonable. As is, you could justify > erroring out, but I too think that would be overzealous. I think that's very intentional and not a defect in the standard. If one TU was allowed to define: void printf() { } and have that compiled into the program, then that would cause unexpected behaviour for every other TU which includes and calls printf. They would get the non-standard rogue printf.