Re:Firm: a C library with graph-based IR suitable for compilers
by lindig on Monday January 18, 2016 @11:48AM
(#10925370)
The following code crashes the compiler but is accepted by GCC.
I have filed a bug report.
[ Parent
| on HN ]
Re:Firm: a C library with graph-based IR suitable for compilers
by PeCaN on Monday January 18, 2016 @12:00PM
(#10925425)
0-length arrays are a GNU C extension[1].
In ISO C99, they're only permitted as the last member of a struct with another member, and are written with an empty pair of brackets[] and no 0.
Re:Firm: a C library with graph-based IR suitable for compilers
by lindig on Monday January 18, 2016 @12:09PM
(#10925467)
The compiler is described on its home page as "accompanying GCC-compatible C frontend." So what does this mean with respect to GCC features? In any case, I don't think the compiler should crash but report a syntax error.
Re:Firm: a C library with graph-based IR suitable for compilers
by Rotluchs on Monday January 18, 2016 @01:02PM
(#10925778)
It's sufficiently compatible to handle e.g. glibc, which is quite a feat, because it uses many and somewhat obscure gcc extensions.
Re:Firm: a C library with graph-based IR suitable for compilers
by qznc on Monday January 18, 2016 @01:00PM
(#10925762)
Thanks for the bug report! :)
Re:Firm: a C library with graph-based IR suitable for compilers
by Rotluchs on Monday January 18, 2016 @04:14PM
(#10927000)
Fixed, thanks for the report. (:
(stupid gcc extensions sigh)
Re:Firm: a C library with graph-based IR suitable for compilers
by jevinskie on Monday January 18, 2016 @11:29PM
(#10928875)
Howdy! Very interesting project, coming from an avid LLVM user. Do you or your organization have a Twitter/FB/social page and/or GitHub page?
Re:Firm: a C library with graph-based IR suitable for compilers
by Rotluchs on Tuesday January 19, 2016 @02:08AM
(#10929237)
We have an IRC channel (#firm on FreeNode), a mailing list (see libfirm.org) and there are github mirrors for cparser (https://github.com/MatzeB/cparser) and libfirm (https://github.com/MatzeB/libfirm/).
If you want to report a bug, there's our bugtracker (also linked on libfirm.org)