ormal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: sasho648 at gmail dot com
Target Milestone: ---
Because they don't reserve any storage.
union db { union dd dd[0]; unsigned char udb; signed char sdb; } *ptr;
union dd { uni
: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: sasho648 at gmail dot com
Target Milestone: ---
Consider the following code:
main()
{
auto a(char a, struct t { char t[a] } t)
{
}
}
It currently ICEs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88523
sasho648 at gmail dot com changed:
What|Removed |Added
Summary|Allow slick and sick|Allow slick and sick
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88523
--- Comment #2 from sasho648 at gmail dot com ---
I'm referring to the function without linkage main. The one with linkage that
is declared at file scope has no relation at all with my proposal - I'm just
using the opportunity to introd
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88523
--- Comment #3 from sasho648 at gmail dot com ---
The included phrase in the standard would read something like:
If an incomplete structure type is the composite type of a function - it's
allowed to be completed inside its prototype in
Assignee: unassigned at gcc dot gnu.org
Reporter: sasho648 at gmail dot com
Target Milestone: ---
Consider the following snippet:
main()
{
struct t a = (sizeof(struct t { }), a);
}
It currently fails with variable 'a' has initializer but incomplete type.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88532
--- Comment #2 from sasho648 at gmail dot com ---
Related points from the standard:
6.7.9 p3 states:
The type of the entity to be initialized shall be an array of unknown size or a
complete object type that is not a variable length array type
NCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: sasho648 at gmail dot com
Target Milestone: ---
Consider this example:
int main(int argc, char **argv)
{
struct {int _[argc];} fn() { }
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70093
--- Comment #1 from sasho648 at gmail dot com ---
As a comment - I'll add that this feature looks fascinating and my personal
opinion is that code like this should be allowed.
I even suggest a way of allowing the return VM type access t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70093
--- Comment #2 from sasho648 at gmail dot com ---
The bug occurs at the most simple 'gcc test_code.c' command.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70093
--- Comment #12 from sasho648 at gmail dot com ---
I would really love you guys if you actually could implement something like
this:
void fun(int a)
{
struct {int _[a];} fun();
}
In order to allow functions returning self-managed VLAs
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: sasho648 at gmail dot com
Target Milestone: ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70418
sasho648 at gmail dot com changed:
What|Removed |Added
Summary|VM structure type specifier |VM structure type specifier
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70418
--- Comment #2 from sasho648 at gmail dot com ---
Must be noted that such code must be valid and actually currently working fine
and as expected when the function is not nested. Eg.:
#include
extern void fp(int a, const struct {int _[a];} *b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70418
--- Comment #3 from sasho648 at gmail dot com ---
currently *is* working fine and as expected when the function is not nested
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70418
--- Comment #4 from sasho648 at gmail dot com ---
The full ice message is:
test_bug_0.c: In function ‘main’:
test_bug_0.c:24:1: internal compiler error: Segmentation fault
0xb482ef crash_signal
../../gcc/gcc/toplev.c:335
0xbda96a
ormal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: sasho648 at gmail dot com
Target Milestone: ---
Consider this code:
#include
extern void f(int *p)
{
p = *((int (*)[6])p);
if(p == NULL)
printf(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71538
--- Comment #1 from sasho648 at gmail dot com ---
The exact command used to compile this code was "gcc -O3 test.c" (as test.c
containing the snippet above).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71538
--- Comment #3 from sasho648 at gmail dot com ---
But if it's NULL for the cast it'll invoke UB I believe. Shouldn't the
optimizer assume that UB never occur?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71538
--- Comment #4 from sasho648 at gmail dot com ---
More *shocking* example will be:
struct tx { int a[6], b[6]; } *f();
void (main)()
{
int *p = f()->b;
if(p == NULL)
printf("What?");
}
Compil
20 matches
Mail list logo