Fix up vla, vm and [*] semantics for C

Mike Stump mrs@apple.com
Fri May 12 22:15:00 GMT 2006


This patch fixes up vla, vm and [*] semantics for C.

Review points:

Ok to change typeof(vm) evaluation semantics for gnu89?

Ok to change sizeof (vla) evaluation semantics for gnu89?

Ok to narrow vla usage in structs and unions in gnu89?

Ok to narrow vm with extern in gnu89?

Ok to narrow gnu99 to be more like c99 wrt vla/vm/[*]?

I think based upon the testing results, gnu89 and gnu99 need to leave  
vlas in structures and unions alone, agree?  Joseph, want to propose  
this for the next C standard?

Ok for 4.3?

Ok for 4.2?

For some additional testing, I'll be running all of MacOS through  
this as well as some industry standard testsuites very shortly.  I  
don't expect any issues, but if I find any, I'll send out a round 2.

The testsuite needs cleanups based upon the above points. affected  
tests include:

gcc.c-torture/compile/20010605-1.c:7: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/compile/20020210-1.c:2: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/compile/20030224-1.c:5: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/compile/20050801-2.c:4: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/compile/920428-4.c:1: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/compile/920501-16.c:1: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/compile/nested-1.c:10: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/execute/20020412-1.c:24: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/execute/20040308-1.c:6: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/execute/20040423-1.c:6: error: not an ordinary  
identifier, structure and unions are not ordinary
gcc.c-torture/execute/20041218-2.c:5: error: not an ordinary  
identifier, structure and unions are not ordinary

And last, thanks to Joseph for all the pointers and help.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vla-1c.diffs.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060512/69cfd995/attachment.txt>


More information about the Gcc-patches mailing list