From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by sourceware.org (Postfix) with ESMTPS id A329039421C7 for ; Wed, 8 Jun 2022 20:59:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A329039421C7 Date: Wed, 08 Jun 2022 20:59:49 +0000 To: Eric Gallager From: Miika Cc: "gcc@gcc.gnu.org" Reply-To: Miika Subject: [RFC] Support for nonzero attribute Message-ID: In-Reply-To: References: <6PeOfngSW_gLKMPtqp7UWs9ZQRv6KpLer221P_B9lNGGC7nJD0p-ta_7b0fwgSdz6cw7UzXsO0OGg0t2UUux81cVfIZkQcbjPwcRHFsNomI=@protonmail.com> Feedback-ID: 17471336:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2022 21:00:01 -0000 On Wednesday, June 8th, 2022 at 8:42 PM, Eric Gallager wrote: > Could you take a look at bug 78155 too? There was a request to add > something like this in that bug: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D78155 > (and I think I've seen similar requests elsewhere, too) I took a look at the bug and looks like the inrange attribute can be applie= d to builtin functions too. So now the example code int main (void) { __builtin_printf ("%i\n", __builtin_isalpha (999999)); } Now gives the following error: foo.c: In function 'main': foo.c:3:31: warning: argument in position 1 not in rage of 0..255 [-Winrang= e] 3 | __builtin_printf ("%i\n", __builtin_isalpha (999999)); | Miika