[Bug c/25702] feature request: generate a warning for sizeof on a pointer

2015-08-12 Thread meklund at cisco dot com
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.

[Bug c/44384] builtin_object_size_ treatment of multidimensional arrays is unexpected

2011-04-21 Thread meklund at cisco dot com
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

[Bug c/44384] builtin_object_size_ treatment of multidimensional arrays is unexpected

2011-03-29 Thread meklund at cisco dot com
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 (

[Bug middle-end/44386] builtin_object_size_ assumes a flexible array for a long array in a structure of known length

2010-06-07 Thread meklund at cisco dot com
--- 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

[Bug c/44386] builtin_object_size_ assumes a flexible array for a long array in a structure of known length

2010-06-02 Thread meklund at cisco dot com
--- 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'.

[Bug c/44386] New: builtin_object_size_ assumes a flexible array for a long array in a structure of known length

2010-06-02 Thread meklund at cisco dot com
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

[Bug c/44384] New: builtin_object_size_ treatment of multidimensional arrays is unexpected

2010-06-02 Thread meklund at cisco dot com
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

[Bug c/25702] feature request: generate a warning for sizeof on a pointer

2007-11-28 Thread meklund at cisco dot com
--- 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

[Bug c/25702] feature request: generate a warning for sizeof on a pointer

2006-01-17 Thread meklund at cisco dot com
--- 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

[Bug c/25702] feature request: generate a warning for sizeof on a pointer

2006-01-06 Thread meklund at cisco dot com
--- 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

[Bug c/25702] New: feature request: generate a warning for sizeof on a pointer

2006-01-06 Thread meklund at cisco dot com
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