GNOME Bugzilla – Bug 724851
g-ir-scanner does not recognize _Noreturn
Last modified: 2015-02-07 17:01:37 UTC
I get these warning when running g-ir-scanner on FreeBSD: /usr/include/stdlib.h:82: syntax error, unexpected identifier in '_Noreturn void abort(void);' at '_Noreturn' /usr/include/stdlib.h:92: syntax error, unexpected identifier in '_Noreturn void exit(int);' at '_Noreturn' /usr/include/stdlib.h:151: syntax error, unexpected identifier in '_Noreturn void _Exit(int);' at '_Noreturn' /usr/include/stdlib.h:160: syntax error, unexpected identifier in '_Noreturn void' at '_Noreturn' _Noreturn is a C11 keyword, so g-ir-scanner should be able to recognize it instead of showing syntax error.
Created attachment 270473 [details] [review] scanner: Ignore C11 _Noreturn keyword This shows up in the headers in FreeBSD's stdlib. Now I didn't add anything to regress.h because I think that'd introduce an effective hard dependency on a C11-capable compiler, unless we used #ifdef trickery. But the problem with #ifdef is that the -expected.gir isn't conditional.
(In reply to comment #1) > Created an attachment (id=270473) [details] [review] > scanner: Ignore C11 _Noreturn keyword > The patch works
Attachment 270473 [details] pushed as 6f25aae - scanner: Ignore C11 _Noreturn keyword
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]