Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: osandov at osandov dot com
Target Milestone: ---
It is currently impossible for a debugger to distinguish between a zero-length
and a flexible array given the debug info generated by GCC:
$ cat zero_length.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86985
--- Comment #1 from Omar Sandoval ---
Posted a patch here: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00994.html.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86985
--- Comment #3 from Omar Sandoval ---
They are not equivalent in GCC, see
https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html. In particular, flexible
arrays cannot be the only member in a struct, cannot be a member of a union,
cannot be used as
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: osandov at osandov dot com
Target Milestone: ---
For the following code:
#include
struct vector {
int *data;
size_t size;
};
int *vector_end(struct vector *vec)
{
return vec->data + vec->size;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111409
Omar Sandoval changed:
What|Removed |Added
Resolution|--- |FIXED
Status|UNCONFIRMED
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: osandov at osandov dot com
Target Milestone: ---
When using -g3 -gsplit-dwarf, the generated macro information has a couple of
issues.
I'm using the following trivial source file:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111409
--- Comment #1 from Omar Sandoval ---
Patch sent:
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630242.html