LWN.net Logo

GCC Explorer - an interactive take on compilation

GCC Explorer - an interactive take on compilation

Posted May 30, 2012 11:28 UTC (Wed) by jamesh (guest, #1159)
In reply to: GCC Explorer - an interactive take on compilation by jzbiciak
Parent article: GCC Explorer - an interactive take on compilation

That kind of thing only really happens when using a static initialiser for a character array. Since this was an array of pointers, that doesn't apply.

This is all part of the C standard, so I doubt you'd see much variation in any compiler made in the last 15 years (probably more).


(Log in to post comments)

GCC Explorer - an interactive take on compilation

Posted May 30, 2012 14:03 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246) [Link]

Of course, GCC Explorer is showing us a C++ compiler, not a C compiler. There are many here who will point out that C++ isn't C or even a superset of C. ;-)

GCC Explorer - an interactive take on compilation

Posted May 30, 2012 15:32 UTC (Wed) by jamesh (guest, #1159) [Link]

Right, but you can mostly think of it as a superset of C for things that C compilers agreed on 15+ years ago. And this particular piece of code was just using basic types and syntax common to both languages, so you would expect it to behave similarly.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds