Remix.run Logo
Built-In Functions Provided by GCC(gcc.gnu.org)
25 points by todsacerdoti 7 days ago | 6 comments
webdevver 21 hours ago | parent | next [-]

shame we dont do more cool stuff with builtins. so many times ive wished for something like

__builtin_regex_compile() __builtin_regex_match()

wyldfire 21 hours ago | parent | next [-]

regexes don't generally belong as compiler builtins. Those are more suitable for language standard libraries or OS standards like POSIX.

If there were an ISA out there that had some kind of regular expression feature, those could conceivably be supported with builtins, though.

https://pubs.opengroup.org/onlinepubs/009696899/functions/re...

JonChesterfield 15 hours ago | parent [-]

The dividing line between compiler builtin, language primitive, standard library or compiler runtime doesn't really exist if you don't want it to. They're all variations on the same theme.

johnisgood 20 hours ago | parent | prev | next [-]

I wonder how one would do DFA minimization with that though. Implement regexp functional equivalence testing so I will not have to! :D

JonChesterfield 15 hours ago | parent | prev [-]

That could be implemented as a pass you load yourself if you don't want to to wait / persuade other people to ship it.

21 hours ago | parent | prev [-]
[deleted]