logoalt Hacker News

rowanG077today at 1:35 AM5 repliesview on HN

I thought the point of Fil-C was to be a drop in safe replacement of C. This project existing implies it isn't. What's going on?


Replies

torginustoday at 8:05 AM

Afaict, there are some patterns that are not supported, like converting pointers to/from integers and doing stuff with them like bitmasks (which is a huge anti-pattern, but some code bases do it)

loegtoday at 2:42 AM

It isn't entirely drop-in for all programs.

wat10000today at 2:33 AM

Most large C code bases aren’t really written in C. They’re written in an almost-C that includes certain extensions and undefined behavior. In this case, it uses inline assembly (an extension) and manipulating pointers as integers (undefined behavior).

show 1 reply
blubtoday at 8:32 AM

QtBase is C++ first of all.

Massive projects like Qt also push compilers to their limits and use various compiler-specific and platform-specific techniques which might appear as bugs to Fil-C.

meibotoday at 1:37 AM

It's not done yet.

show 1 reply