bugNana - Bugs: bug #15730, g++ nana.h: invalid conversion...


bug #15730: g++ nana.h: invalid conversion from 'void* (*)(size_t)throw (0)' to 'void*'

Submitter:  None
Submitted:  Mon 13 Feb 2006 01:35:35 AM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Tue 14 Feb 2006 03:32:34 PM UTC, comment #1: 

on the advise of the surrounding comments, I commented out the offending line in nana-config.h, and now my tests run fine with g++ from gcc-4.0.2.

I am left with a few questions, though. Are the ALWAYS_INCLUDE_MALLOC contortions are still necessary for Linux? It looks like nana has not been under active development for some time, and libc and gcc have changed quite a bit in that time. If so, can the "static void *_nana_p = malloc" declaration be changed to something more g++ friendly?

Perhaps most important for me, as a producer of another package: Is there a way to package nana that wouldn't require users of my package to edit the nana header files in /usr/include?

If I make any progress answering those questions I will be sure to let you know.

Once again, thanks for the fine software!

John Gibson

Mon 13 Feb 2006 01:35:35 AM UTC, original submission:  

Compiling the following test program (nanatest.c)

#include <nana.h>
int main() {

with g++ gives the following error

gibson@akbar$ g++ nanatest.c -lnana
/usr/include/nana-config.h:84: error: invalid conversion from ‘void* ()(size_t)throw ()’ to ‘void

The same program compiles and runs fine as C code (gcc nanatest.c -lnana).

Platform info:

gibson@akbar$ rpm -q nana
gibson@akbar$ rpm -q gcc
gibson@akbar$ cat /etc/SuSE-release
SUSE LINUX 10.0 (i586) OSS
VERSION = 10.0
gibson@akbar$ uname -a
Linux akbar 2.6.13-15.8-default #1 Tue Feb 7 11:07:24 UTC 2006 i686 i686 i386 GNU/Linux

Thanks for your work on nana. I'm hoping to use it instead of
assert.h for my project Channelflow (www.nongnu.org/channelflow).

John Gibson



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #1992:  nanatest.c added by None (45B - text/x-csrc - test program that produces errors with g++-4..0.2)


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.


Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2006-02-13 None Attached File- Added nanatest.c, #3398

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code