avr-gcc-12.1.0-x64-windows new warnings ?
Royce Pereira <[email protected]> Mon, 24 Apr 2023 02:27:28 +0530
| Newsgroups | gmane.comp.hardware.avr.gcc |
|---|---|
| Message-ID | <CACzHknj48NBNE77Cn6qW2BMf_=N=zYiEKwwcbr5DBQNe4frTUg@mail.gmail.com> |
--00000000000012b7cd05fa07241a
Content-Type: text/plain; charset="UTF-8"
Hi,
I just tried avr-gcc 12.1.0 on an old project, and got some new warning I
can't explain.
The code is:
PORTC &= 0xFE ; //clear bit 0.
and the warning is:
warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]'
{aka 'volatile unsigned char[]'} [-Warray-bounds]
What is this warning and what array is it referring to?
Thank you!
--
Best Regards,
-- Royce Pereira
--00000000000012b7cd05fa07241a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi,<div><br></div><div>I just tried avr-gcc 12.1.0 on an o=
ld project, and got some new warning I can't explain.</div><div><br></d=
iv><div>The code is:</div><div><br></div><div>PORTC &=3D 0xFE ;=C2=A0 /=
/clear bit 0.<br></div><div><br></div><div>and the warning is:</div><div>wa=
rning: array subscript 0 is outside array bounds of 'volatile uint8_t[0=
]' {aka 'volatile unsigned char[]'} [-Warray-bounds]<br></div><=
div><br></div><div>What is this warning and what array is it referring=C2=
=A0to?</div><div><br></div><div>Thank you!</div><div><br></div><span class=
=3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_s=
ignature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr">Best Regards,=
<div><br></div><div>-- Royce Pereira</div></div></div></div>
--00000000000012b7cd05fa07241a--