[Bug c/31513] New: Miscompilation of Function Passing Bit Field Value to Function

2007-04-08 Thread isanbard at gmail dot com
verity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: isanbard at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31513

[Bug c/108896] provide "element_count" attribute to give more context to __builtin_dynamic_object_size() and -fsanitize=bounds

2023-03-03 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 --- Comment #14 from Bill Wendling --- (In reply to Martin Uecker from comment #9) > > > Considering that the GNU extensions is rarely used, one could consider > > > redefining the meaning of > > > > > > int n = 1; > > > struct { > > >   int n;

[Bug c/108896] provide "element_count" attribute to give more context to __builtin_dynamic_object_size() and -fsanitize=bounds

2023-03-03 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 --- Comment #16 from Bill Wendling --- (In reply to Martin Uecker from comment #15) > Am Freitag, dem 03.03.2023 um 20:27 + schrieb isanbard at gmail dot com: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 > > >

[Bug c/108896] provide "element_count" attribute to give more context to __builtin_dynamic_object_size() and -fsanitize=bounds

2023-03-06 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 --- Comment #18 from Bill Wendling --- (In reply to Martin Uecker from comment #17) > Am Freitag, dem 03.03.2023 um 23:18 + schrieb isanbard at gmail dot com: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 > > >

[Bug middle-end/101836] __builtin_object_size(P->M, 1) where M is an array and the last member of a struct fails

2022-07-22 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 Bill Wendling changed: What|Removed |Added CC||isanbard at gmail dot com --- Comment

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-30 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #33 from Bill Wendling --- (In reply to Kees Cook from comment #31) > (In reply to Qing Zhao from comment #25) > > The source code need to be: > > > > If (__builtin_get_counted_by (P->FAM)) > > __builtin_get_counted_by (P->FAM) =

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-30 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #37 from Bill Wendling --- (In reply to Jakub Jelinek from comment #36) > (In reply to Bill Wendling from comment #33) > > __builtin_get_attr_arg (ptr, attr_name) > > > > This could have an optional argument to specify which argum

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-31 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #39 from Bill Wendling --- (In reply to qinzhao from comment #38) > (In reply to Bill Wendling from comment #37) > > That does make me wonder at the usefulness of this feature. The user will > > need to set the count whether or not t

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-31 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #43 from Bill Wendling --- (In reply to qinzhao from comment #40) > Note, our original purpose of adding this new builtin is explicitly > described in description section as: > > with the new builtin, "structs can gain the counted_b

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-31 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #46 from Bill Wendling --- (In reply to qinzhao from comment #45) > (In reply to Jakub Jelinek from comment #42) > > > > But for the kernel you'll need to have fallback code which will set the > > actual counter manually for compile

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-08-05 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #57 from Bill Wendling --- (In reply to Kees Cook from comment #47) > Yes, the counter must be manually set until Linux minimum compiler versions > are raised to include counted_by support, but this is about making the > transition t

[Bug c/113514] New: Wrong __builtin_dynamic_object_size when using a set local variable

2024-01-19 Thread isanbard at gmail dot com via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: isanbard at gmail dot com Target Milestone: --- There appears to be an issue with __builtin_dynamic_object_size() when using a local variable. The following code should output 40 for

[Bug middle-end/113514] Wrong __builtin_dynamic_object_size when using a set local variable

2024-01-19 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113514 --- Comment #3 from Bill Wendling --- (In reply to Andrew Pinski from comment #1) > The answer is not really and it is complex. > Okay. It just seems counter-intuitive. > So I will note that clang/LLVM returns 48 for `f.bar[argc], 1` and 0 for

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-24 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 Bill Wendling changed: What|Removed |Added CC||isanbard at gmail dot com --- Comment

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-25 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #18 from Bill Wendling --- (In reply to qinzhao from comment #12) > (In reply to Bill Wendling from comment #10) > > The Clang implementation will probably have a prototype of something like: > > > > void __builtin_set_counted_by(

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-25 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #19 from Bill Wendling --- (In reply to Siddhesh Poyarekar from comment #13) > (In reply to qinzhao from comment #11) > > After the discussion with Kees on the major usage of this new builtin, I > > think that the above Category A mi

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-25 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #21 from Bill Wendling --- Another question: Should we allow side-effects in the builtin? I think it would cause too much pain if we did. If we don't allow it, should it emit a warning or silently become a no-op?

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-26 Thread isanbard at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 --- Comment #23 from Bill Wendling --- (In reply to qinzhao from comment #22) > the following is the user documentation I came up based on all the > discussion so far, let me know any comment and suggestion. (refer to GCC's > __builtin_clear_pad