https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25702
--- Comment #11 from Mark Eklund ---
-Wsizeof-pointer-memaccess is definitely a good targeted fix and probably hits
a majority of what I've seen. I'm good with this being resolved.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44384
--- Comment #4 from Mark Eklund 2011-04-21 15:17:37
UTC ---
Although "subobject" isn't well defined in the documentation,
the below comments from tree-object-size.c revision r171388
lines 63-68 would indicate that subobject is the innermost arra
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44384
--- Comment #2 from Mark Eklund 2011-03-29 20:31:15
UTC ---
I use FORTIFY_SOURCE with a USE_FORTIFY_LEVEL of 2
and was surprised that the below code allowed
writing into fu[4][0]. I expected that at a
level of 1, but not 2.
#include
int bar (
--- Comment #4 from meklund at cisco dot com 2010-06-07 15:26 ---
I see your point that some legacy code might use a larger size as a flexible
array.
What is you opinion on the possibility of adding a bit-flag to
__builtin_object_size() (like 0x04) that tightens the allowed flexible
--- Comment #1 from meklund at cisco dot com 2010-06-02 16:33 ---
I've re-run the code varying the flag from 0 to 3 (instead of hard coding to 3)
with the below results. The unexpected results are still happening for 'a',
'b', 'd', and 'f'.
array in a structure of known length
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: meklund at cisco dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44386
unexpected
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: meklund at cisco dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44384
--- Comment #5 from meklund at cisco dot com 2007-11-28 19:43 ---
Subject: Re: feature request: generate a warning for sizeof on a pointer
Hi Manu,
This is in regards to your Comments for the gcc feature enhancement
request, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25702.
On Wed
--- Comment #3 from meklund at cisco dot com 2006-01-17 15:36 ---
Subject: Re: feature request: generate a warning for sizeof on a pointer
Using the FreeBSD latest CVS pull on 10-Jan-06 (5.4 based), a build world
was run with the below modifications to GCC. The output was then
--- Comment #2 from meklund at cisco dot com 2006-01-06 22:24 ---
Subject: Re: feature request: generate a warning for sizeof on a pointer
On Fri, Jan 06, 2006 at 10:12:55PM -, pinskia at gcc dot gnu dot org wrote:
> Actually people use sizeof(x) all the time to mean the corr
pointer
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: meklund at cisco dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25702
11 matches
Mail list logo