After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724851 - g-ir-scanner does not recognize _Noreturn
g-ir-scanner does not recognize _Noreturn
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
2.39.x
Other FreeBSD
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-02-21 03:35 UTC by Ting-Wei Lan
Modified: 2015-02-07 17:01 UTC
See Also:
GNOME target: ---
GNOME version: 3.11/3.12


Attachments
scanner: Ignore C11 _Noreturn keyword (1.12 KB, patch)
2014-02-27 13:55 UTC, Colin Walters
committed Details | Review

Description Ting-Wei Lan 2014-02-21 03:35:57 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.
Comment 1 Colin Walters 2014-02-27 13:55:01 UTC
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.
Comment 2 Ting-Wei Lan 2014-02-27 18:11:40 UTC
(In reply to comment #1)
> Created an attachment (id=270473) [details] [review]
> scanner: Ignore C11 _Noreturn keyword
> 

The patch works
Comment 3 Colin Walters 2014-02-27 18:17:46 UTC
Attachment 270473 [details] pushed as 6f25aae - scanner: Ignore C11 _Noreturn keyword
Comment 4 André Klapper 2015-02-07 17:01:37 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]