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

 
 

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

Submitted by:  None
Submitted on:  Mon 13 Feb 2006 01:35:35 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

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

Compiling the following test program (nanatest.c)

-------------------
#include <nana.h>
int main() {
I(0==1);
}
-------------------

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
nana-2.5-30
gibson@akbar$ rpm -q gcc
gcc-4.0.2_20050901-3
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 (http://www.nongnu.org/channelflow).

John Gibson

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Mon 13 Feb 2006 01:35:35 AM UTCNoneAttached File-=>Added nanatest.c, #3398

Back to the top


Powered by Savane 3.1-cleanup