Fix nci declarations #897

Closed
rurban opened this Issue Dec 24, 2012 · 2 comments

Comments

Projects
None yet
1 participant
Member

rurban commented Dec 24, 2012

The nci C generator misses the declaration for Parrot_glut_nci_loader, and creates duplicate
declarations in nci_test.

src/glut_nci_thunks.c:7335:1: warning: no previous prototype for ‘Parrot_glut_nci_loader’ [-Wmissing-prototypes]
src/glut_nci_thunks.c: In function ‘Parrot_glut_nci_loader’:
src/nci_test.c:138:5: warning: duplicate declaration of ‘int_cb_D4’ is invalid in C++ [-Wc++-compat]
src/nci_test.c:129:45: note: previous declaration of ‘int_cb_D4’ was here
src/nci_test.c:139:5: warning: duplicate declaration of ‘nci_dlvar_char’ is invalid in C++ [-Wc++-compat]
src/nci_test.c:130:45: note: previous declaration of ‘nci_dlvar_char’ was here
src/nci_test.c:140:5: warning: duplicate declaration of ‘nci_dlvar_short’ is invalid in C++ [-Wc++-compat]
src/nci_test.c:131:45: note: previous declaration of ‘nci_dlvar_short’ was here
src/nci_test.c:141:5: warning: duplicate declaration of ‘nci_dlvar_int’ is invalid in C++ [-Wc++-compat]
src/nci_test.c:132:45: note: previous declaration of ‘nci_dlvar_int’ was here
src/nci_test.c:142:6: warning: duplicate declaration of ‘nci_dlvar_long’ is invalid in C++ [-Wc++-compat]
src/nci_test.c:133:46: note: previous declaration of ‘nci_dlvar_long’ was here
src/nci_test.c:143:7: warning: duplicate declaration of ‘nci_dlvar_float’ is invalid in C++ [-Wc++-compat]
src/nci_test.c:134:47: note: previous declaration of ‘nci_dlvar_float’ was here
src/nci_test.c:144:8: warning: duplicate declaration of ‘nci_dlvar_double’ is invalid in C++ [-Wc++-compat]
src/nci_test.c:135:48: note: previous declaration of ‘nci_dlvar_double’ was here
src/nci_test.c:145:6: warning: duplicate declaration of ‘nci_dlvar_cstring’ is invalid in C++ [-Wc++-compat]
src/nci_test.c:136:46: note: previous declaration of ‘nci_dlvar_cstring’ was here

rurban was assigned Dec 24, 2012

Member

rurban commented Jan 2, 2013

Fixed in branch rurban/nci-void-gh904

@rurban rurban pushed a commit that referenced this issue Jan 2, 2013

Reini Urban [GH #904, #897] nci_thunk_gen v0.02: fix sig "p v", add declaration
Add test for bug #904. Wrong arguments for void sig.
void use empty arguments calls and do not need to handle call_object overhead.

[GH #897] Add declaration of the nci loader function, for the static nci
functions not yet.
8ee3e81

@rurban rurban pushed a commit that referenced this issue Jan 2, 2013

Reini Urban Fix src/nci/extra_thunks Makefile rules
Add ChangeLog for GH #897, #904
Follow the renaming of src/extra_nci_thunks.c to src/nci/extra_thunks.c to
check the proper dependencies.
a4ed077

@rurban rurban pushed a commit that referenced this issue Jan 2, 2013

Reini Urban [GH #897] Use --dynext for src/glut_nci_thunks.c, fix decl, check --core
--core already has the two loader declarations in include/parrot/nci.h.
omit the duplicate dynext loader declaration, it was moved the the HEADERIZER section.
regenerate the core nci thunk c files,
do not warn on dups on glut_nci, there will be most likely duplicates, core should have none instead.
7cc5558
Member

rurban commented Jan 4, 2013

2nd issue fixed in rurban/nci_test-dupldecl-gh897 0205c62

@rurban rurban pushed a commit that referenced this issue Jan 7, 2013

Reini Urban [GH #897] Fix duplicate declaration of int_cb_D4 is invalid in C++ wa…
…rnings

Do not declare them twice. Note that static and extern vars both do not work with our nci.
a6b96f4

rurban closed this Jan 10, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment