From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 0B3E83858CDA for ; Mon, 22 Apr 2024 18:59:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B3E83858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0B3E83858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::229 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713812392; cv=none; b=dfgXfvmqhErD/RSuCENSYzuwmaHnDURwuZS4fnn2Xmhs9eED2kwTj3forQRdCPEkhn3qWwdEQR71h/AdG0aLHVaZtl9HPEwPq7BzyjoskDEQZ3i2dNrR6jrWcuAaV5X7iI3SvMN79e/guW44RvYf7/EkCeGbTC9/5r8ZIU5t5S4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713812392; c=relaxed/simple; bh=iPfgNyw69Zl34tUa99R8hnMZ3jlujdRMfTCH4E+JBCI=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=VFOSGZfURl+4vSCY54pPXi3RpAr11i+DLu+Gj8RowVcrJIXIdcmyjs4MGfFfPLByIQCGk3dZqxrYqS3xdJFuO17UFrNoltryiIrJ/kvpoWyNkkFUExe4d0QLtmKS5FfsmMElIz0wspoMKsJkuJms4cp6E8FAUlyI01/1dMQ12EE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2d88a869ce6so67819981fa.3 for ; Mon, 22 Apr 2024 11:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713812389; x=1714417189; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YIP+4UP9VBHl5bPCvk6b9Zuuu1yxV6zt3bN9DSK8jRo=; b=CK49RRUvTteMpZKwRMwF/0przU4m9FS0poRvNmrgjKEt2GoO81fGlf8NANNFLyMRZi 1gHE0NORtb9N6lhBVcYcVuvrzHUkqvNgy1TJ/GW9dup7yBNjQz+acnVVuF3e+CDRNVup bY30obOncOcN10x+WGs+y/KH7ZGgldsDiVkv6laaThkR96ZPLBCZWJYEMwZbDRcXi8ii BuRbmCQz9MgmSvjS954FHAyvjIN8YBVJ1F8gQSHawmypQONj62AHKJBNzoWbq2BGtb57 XimeAsTfyipgzPaKHChbLY/1xbe8YG/CPtLaI9w9E9NgS1T0DtdAeH7vJdRof8TBNQBi hViw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713812389; x=1714417189; h=content-transfer-encoding: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=YIP+4UP9VBHl5bPCvk6b9Zuuu1yxV6zt3bN9DSK8jRo=; b=E3F7xE2F8kOMIXP7F0L4S0u7Ok8GvWxNLwiWvgH8amHHQfW4GX6GS3Siszo5ZyesfW ya3pCeI8+fmE87Fi9Gloh7G4Yg6waObTadnUok5T7oS+auaWVcvtjc6cKcMGkRL/HMWU 1ufa0FD8B14zBTGNCSLg0poRgLhlbStxE+bD4EUBSrQjR0bLZRiO89hiR0OtTODZ8h27 hNcfDeX6ohdBQqPMGJvuqJXluVx84qOKrVgDgF4XP8yYKt8APDW3W7uFR/ay16X+prYB mFH5j30uoiJnlpXlwuvtcycjmK0W9abSZ//IiR25OVSln4x5A33I2Hcr+J1eLTtsVR7m Oj5w== X-Gm-Message-State: AOJu0Yw9R421r/GzH9ODag/W8p22k0uyf6QwUT+J01p+nNHPed6TX0Mk +Z/83ps3BWXcJNvHC5+cNIAqJN5R7xcrUNxg3zJzW/X88qYgMFu8n7GQLZPRMO/RjUZy0H6+5Vx sRM7re05lag7FVYBdpqxuQe0cmo8= X-Google-Smtp-Source: AGHT+IEaxtqqc3aUek4ydaoRQjzfeaRaXG762UD1Z1dFHRIz/eC7BpuJ/Y0Xri2Te6mlMAz/X10g3WQl5FjJ5ur/kZU= X-Received: by 2002:a2e:848a:0:b0:2dc:7d14:c0ee with SMTP id b10-20020a2e848a000000b002dc7d14c0eemr7766612ljh.13.1713812388891; Mon, 22 Apr 2024 11:59:48 -0700 (PDT) MIME-Version: 1.0 References: <20240420185250.05104659901ca18b0c6cb842@schemamania.org> In-Reply-To: <20240420185250.05104659901ca18b0c6cb842@schemamania.org> From: Richard Biener Date: Mon, 22 Apr 2024 20:59:37 +0200 Message-ID: Subject: Re: warnings and warnings To: "James K. Lowden" Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 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 Sun, Apr 21, 2024 at 11:06=E2=80=AFPM James K. Lowden wrote: > > I have two simple questions, I hope! > > 1. Is there a set of flags that, when compiling gcc, is meant to > produce no warnings? I get a surfeit of warnings with my particular > favorite options. -w is supposed to do that > 2. Are the libgcc functions warning_at() and error_at() intended for > use by all front-ends? As of now, our COBOL front-end formats its own > messages with fprintf(3). I would like to emulate normal gcc behavior, > where warnings can be turned on and off, and (especially) elevated to > errors with -Werror. I'm guessing we'd gain access to that > functionality automatically if we engaged with the standard diagnositic > framework, if there is one. > > I'm a little doubtful these are the keys to that kingdom, though. The > comments regarding location_t and the location database seem very > C-specific. Yes, the tools from diagnostic{-core,}.h are usable from all frontends. The location_t is a libcpp thing but it's the location how it is tracked through the middle-end and also for debug information generation so you might want to at least emulate that even when you are not using the preprocessor. The important part is to manage a line-map here. Richard. > --jkl