This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35652] [4.1/4.2/4.3/4.4 Regression] Location information incorrect on string bounds warning
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2008 13:01:47 -0000
- Subject: [Bug c++/35652] [4.1/4.2/4.3/4.4 Regression] Location information incorrect on string bounds warning
- References: <bug-35652-11271@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-03-21 13:01 -------
With that approach we'd get
./cc1plus -quiet -O /tmp/t.ii
t.C: In function 'int main()':
t.C:2: warning: offset outside bounds of constant string
thus a single warning still with wrong location information (at this point we
cannot do better here).
IMHO the warning belongs in the frontend and the warning code from c_strlen
should be deleted.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35652