[Bug c/94692] New: Zero-sized arrays shouldn't require a complete element type

2020-04-21 Thread sasho648 at gmail dot com
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

[Bug c/88523] New: Allow slick and sick incomplete variably modified function return type.

2018-12-16 Thread sasho648 at gmail dot com
: 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

[Bug c/88523] Allow slick and sick variably modified function return type constructed on each instance.

2018-12-16 Thread sasho648 at gmail dot com
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

[Bug c/88523] Allow slick and sick variably modified function return type constructed on each instance.

2018-12-16 Thread sasho648 at gmail dot com
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

[Bug c/88523] Allow slick and sick variably modified function return type constructed on each instance.

2018-12-16 Thread sasho648 at gmail dot com
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

[Bug c/88532] New: variable has initializer but incomplete type

2018-12-17 Thread sasho648 at gmail dot com
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.

[Bug c/88532] variable has initializer but incomplete type

2018-12-17 Thread sasho648 at gmail dot com
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

[Bug c/70093] New: Instancing function with VM type cases internal compiler error in 'assign_stack_temp_for_type'.

2016-03-05 Thread sasho648 at gmail dot com
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() { }

[Bug c/70093] Instancing function with VM return type cases internal compiler error in 'assign_stack_temp_for_type'.

2016-03-05 Thread sasho648 at gmail dot com
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

[Bug c/70093] Instancing function with VM return type cases internal compiler error in 'assign_stack_temp_for_type'.

2016-03-05 Thread sasho648 at gmail dot com
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.

[Bug c/70093] Instancing function with VM return type cases internal compiler error in 'assign_stack_temp_for_type'.

2016-03-08 Thread sasho648 at gmail dot com
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

[Bug c/70418] New: VM structure type specifier in list of parameter declarations function definition

2016-03-26 Thread sasho648 at gmail dot com
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sasho648 at gmail dot com Target Milestone: ---

[Bug c/70418] VM structure type specifier in list of parameter declarations within nested function definition ices.

2016-03-26 Thread sasho648 at gmail dot com
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

[Bug c/70418] VM structure type specifier in list of parameter declarations within nested function definition ices.

2016-03-26 Thread sasho648 at gmail dot com
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

[Bug c/70418] VM structure type specifier in list of parameter declarations within nested function definition ices.

2016-03-26 Thread sasho648 at gmail dot com
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

[Bug c/70418] VM structure type specifier in list of parameter declarations within nested function definition ices.

2016-03-26 Thread sasho648 at gmail dot com
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

[Bug c/71538] New: Obvious optimization related to arrays aren't performed.

2016-06-14 Thread sasho648 at gmail dot com
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(

[Bug c/71538] Obvious optimization related to arrays aren't performed.

2016-06-14 Thread sasho648 at gmail dot com
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).

[Bug c/71538] Obvious optimization related to arrays aren't performed.

2016-06-15 Thread sasho648 at gmail dot com
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?

[Bug c/71538] Obvious optimization related to arrays aren't performed.

2016-06-15 Thread sasho648 at gmail dot com
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