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 607445 - gtk-doc does not support long double as returned value type
gtk-doc does not support long double as returned value type
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.14
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-19 14:08 UTC by Jean Bréfort
Modified: 2010-03-04 22:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jean Bréfort 2010-01-19 14:08:34 UTC
when a function returns a long double, I get an error message such as:

Can't parse args for function in "<RETURNS>long double </RETURNS>
GOCSplinel const *sp, long double x 
" at /usr/local/share/gtk-doc/data/gtkdoc-common.pl line 429, <INPUT> line 1379.
Use of uninitialized value $ret_type in string ne at /usr/local/bin/gtkdoc-mktmpl line 388, <INPUT> line 1379.

Seems that things work for functions having long double arguments but returning something else.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-17 13:35:01 UTC
Whats the whole function declaration?
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-17 13:52:31 UTC
I added this to the tests and it just works fine. Which version are you using?

/**
 * bug_607445:
 * @a: parameter
 *
 * http://bugzilla.gnome.org/show_bug.cgi?id=607445
 */
long double bug_607445(long double a) {
  return 2.0*a;
}
Comment 3 Jean Bréfort 2010-02-17 14:09:14 UTC
Here is one of the functions we have in goffice in that gtk-doc does not love:

long double go_matrix_determinantl 	(long double **A, int n);

The error message is:

unknown:0: warning: Can't parse args for function go_matrix_determinantl: <RETURNS>long double </RETURNS>
long double **A, int n 

Use of uninitialized value $ret_type in string ne at /usr/bin/gtkdoc-mktmpl line 438, <INPUT> line 1487.

I'm using gtk-doc 1.13.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-18 10:04:19 UTC
This seems to be fixed in git HEAD. Any change you can try gtk-doc from gnome git?
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-18 10:07:21 UTC
Uh, just realized that I don't use tmpl docs in the unit tests, so it could be related to that also. So if you could still try git head I would get the right line number for the error.

Please also consider moving the tmpl docs to inline source comments. The use of tmpl docs is deprecated. The git tree has a migration helper under tools directory and the docs (yelp) tell how to switch to a gtkdoc.mak flavour that skips the tmpl step totally.
Comment 6 Jean Bréfort 2010-02-18 21:44:47 UTC
build of gtk-doc from git fails for me with:

warning: failed to load external entity "db2omf.lang"
cannot parse db2omf.lang

I'll investigate when time permits.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-19 19:49:09 UTC
(In reply to comment #6)
> build of gtk-doc from git fails for me with:
> 
> warning: failed to load external entity "db2omf.lang"
> cannot parse db2omf.lang
> 
> I'll investigate when time permits.

That could be from scrollkeeper/rarian? Maybe --disable-scrollkeeper helps.
Comment 8 Jean Bréfort 2010-02-19 21:25:04 UTC
--disable-scrollkeeper made the build succeed, although I had to run make maintainer-clean before, and that surprisingly erased ChangeLog.

Otherwise, the issue is still there. I'll try to skip the tmpl step.
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-19 22:06:35 UTC
Could you give me the error message for the git version. After all it might be easy to fix.

Are you putting docs to inline comments or are you using tmpl files?
Comment 10 Jean Bréfort 2010-02-20 09:46:12 UTC
We do not use tmpl files, just inline comments.

The message I get when not using --flavour no-tmpl is:

gtk-doc: Rebuilding template files
Can't parse args for function in "<RETURNS>long double </RETURNS>
long double **A, int n 
" at /usr/local/share/gtk-doc/data/gtkdoc-common.pl line 429, <INPUT> line 1487.
Use of uninitialized value $ret_type in string ne at /usr/local/bin/gtkdoc-mktmpl line 388, <INPUT> line 1487.

If tmpl is disabled, there is no more error message, things just work fine.

Thanks a lot for your help.
Comment 11 Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-04 22:24:36 UTC
I hope this fixes it also for the tmpl case.

commit 30f95dd1913ff2517c196230d51ec813e735fbc3
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Fri Mar 5 00:20:39 2010 +0200

    mktmpl: improve return type handling. Fixes #607445
    
    Always remove the return tag before pushing it further and then try to parse it.