From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lug-owl.de (lug-owl.de [IPv6:2a03:4000:10:469::]) by sourceware.org (Postfix) with ESMTPS id 28C883858D1E for ; Fri, 12 Jan 2024 03:37:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 28C883858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lug-owl.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lug-owl.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 28C883858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a03:4000:10:469:: ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705030626; cv=none; b=xiI46mlCD/52nTWjlYnhKxyu97SNXLtjkRqpQ4phZd8gPTgcbK8uCI6KHdHwWojDBk/Sb6+q4Ngr6d180i1E+JH+gmvmhebOktfm8KfQ3xPyiDcU56N56nHQsy250qIGBUMOFR6Ci8seynabP6ONfE30aTaKev8BRc+bP/qHDyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705030626; c=relaxed/simple; bh=WbX5MPcqZdF/tkvzq4G9gVk0HaMrXCvSPjiJU6AUbkk=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=uIc6ItVCB1FYI5uG2dcL/XD2WaMtWZm0wbVqr232f2iuqbkHIsZDrHyD8mB/nGB2DTzg5HKT1TcaJ9xXn+3yc9JprXySIB+9xe2h29OhjzxhFeKdtabP6FdDUnn+HeFxv5eRQvGQE4pX4JFDMr06otnazk9etU4WsUsu56IcZLM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by lug-owl.de (Postfix, from userid 1001) id C81D7420C2; Fri, 12 Jan 2024 04:37:02 +0100 (CET) Date: Fri, 12 Jan 2024 04:37:02 +0100 From: Jan-Benedict Glaw To: Georg-Johann Lay Cc: gcc-patches@gcc.gnu.org, Denis Chertykov Subject: Re: [patch,avr,applied] PR target/112952 Fix attribute "io" et al. handling. Message-ID: <20240112033702.GD2971@lug-owl.de> References: <83b90302-bd7b-4064-8c8e-7495ebd3931e@gjlay.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bajzpZikUji1w+G9" Content-Disposition: inline In-Reply-To: <83b90302-bd7b-4064-8c8e-7495ebd3931e@gjlay.de> X-Operating-System: Linux chamaeleon 6.4.0-0.deb12.2-amd64 X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-message-flag: Please send plain text messages only. Do not send HTML emails. Thank you. User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,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 List-Id: --bajzpZikUji1w+G9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, 2024-01-04 17:28:02 +0100, Georg-Johann Lay wrote: > This fixes the avr-specific attributes io, io_low and address, > that are all basically the same except that io and io_low imply > assertions on allowed addressing modes. > --- a/gcc/config/avr/avr.cc > +++ b/gcc/config/avr/avr.cc [...] > @@ -10385,12 +10389,10 @@ avr_handle_addr_attribute (tree *node, tree nam= e, tree args, > } > else if (io_p > && (!tree_fits_shwi_p (arg) > - || !(strcmp (IDENTIFIER_POINTER (name), "io_low") =3D=3D 0 > - ? low_io_address_operand : io_address_operand) > - (GEN_INT (TREE_INT_CST_LOW (arg)), QImode))) > + || ! IN_RANGE (TREE_INT_CST_LOW (arg), io_start, io_end))) > { > - warning_at (loc, OPT_Wattributes, "%qE attribute address " > - "out of range", name); > + warning_at (loc, OPT_Wattributes, "%qE attribute address out of " > + "range 0x%x...0x%x", name, (int) io_start, (int) io_end); > *no_add =3D true; > } > else Building with a recent GCC, this results in a new warning (here forced to an error with --enable-werror-alway--enable-werror-always): /var/lib/laminar/run/gcc-avr-elf/64/local-toolchain-install/bin/g++ -fno-P= IE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fn= o-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings= -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloa= ded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-s= trings -Werror -fno-common -DHAVE_CONFIG_H -fno-PIE -I. -I. -I../../gcc/gc= c -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/i= nclude -I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber -I../../= gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktra= ce -o avr.o -MT avr.o -MMD -MP -MF ./.deps/avr.TPo ../../gcc/gcc/config/a= vr/avr.cc =2E./../gcc/gcc/config/avr/avr.cc: In function 'tree_node* avr_handle_addr_= attribute(tree_node**, tree, tree, int, bool*)': =2E./../gcc/gcc/config/avr/avr.cc:10391:45: error: unquoted sequence of 3 c= onsecutive punctuation characters '...' in format [-Werror=3Dformat-diag] 10391 | warning_at (loc, OPT_Wattributes, "%qE attribute address = out of " | ^~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~ 10392 | "range 0x%x...0x%x", name, (int) io_start, (i= nt) io_end); | ~~~~~~~~~~~~~~~~~~~ =20 cc1plus: all warnings being treated as errors make[1]: *** [Makefile:2554: avr.o] Error 1 make[1]: Leaving directory '/var/lib/laminar/run/gcc-avr-elf/64/toolchain-b= uild/gcc' make: *** [Makefile:4676: all-gcc] Error 2 I think this should be "%<...%>". MfG, JBG --=20 --bajzpZikUji1w+G9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCZaCz2wAKCRAdvV51g5nh u7NaAKCSMFYJM9T1HW+21hbtwMJ1RweIrQCfS6/DQngYdmTgCuYDJ6hBxD2yvho= =xXb4 -----END PGP SIGNATURE----- --bajzpZikUji1w+G9--