[XML-SIG] FW: pyexpat compilation errors - Python 2.0b1

Favas, Mark (EM, Floreat) Mark.Favas@per.dem.csiro.au
Tue, 4 Jul 2000 14:51:39 +0800


I reported the following to the xml-sig some time ago, but it's still
there in the current (July 4) CVS version of Python 2.0b1 - must have
got lost in the noise <grin>.

Platform: DEC Alpha, Tru64 Unix V4.0F, Compaq C V6.1-110

cc  -I/home/gonzo1/mark/PyXML-0.5.5.1/extensions/expat/xmlparse -O
-Olimit 1500 -I./../Include -I.. -DHAVE_CONFIG_H -c ./pyexpat.c
cc: Error: ./pyexpat.c, line 69: The static declaration of
"handler_info" is a tentative definition and specifies an incomplete
type. (incompstat)
staticforward struct HandlerInfo handler_info[];
---------------------------------^

If I replace this definition by
staticforward struct HandlerInfo handler_info[64];
pyexpat then compiles (with the following warnings):

(64 was just chosen at random - needs to be larger than 1, though...)

and the warnings can be gotten rid of by explicitly casting the
my_XXXHandler values to void *

cc  -I/home/gonzo1/mark/PyXML-0.5.5.1/extensions/expat/xmlparse -O
-Olimit 1500 
-I./../Include -I.. -DHAVE_CONFIG_H -c ./pyexpat.c
cc: Warning: ./pyexpat.c, line 987: In the initializer for
handler_info[0].handl
er, the referenced type of the pointer value "my_StartElementHandler" is
"functi
on (pointer to void, pointer to const char, pointer to pointer to const
char) re
turning void", which is not compatible with "void". (ptrmismatch)
        my_StartElementHandler},
--------^
cc: Warning: ./pyexpat.c, line 990: In the initializer for
handler_info[1].handl
er, the referenced type of the pointer value "my_EndElementHandler" is
"function
 (pointer to void, pointer to const char) returning void", which is not
compatib
le with "void". (ptrmismatch)
        my_EndElementHandler},
--------^
cc: Warning: ./pyexpat.c, line 993: In the initializer for
handler_info[2].handl
er, the referenced type of the pointer value
"my_ProcessingInstructionHandler" i
s "function (pointer to void, pointer to const char, pointer to const
char) retu
rning void", which is not compatible with "void". (ptrmismatch)
        my_ProcessingInstructionHandler},
--------^
cc: Warning: ./pyexpat.c, line 996: In the initializer for
handler_info[3].handl
er, the referenced type of the pointer value "my_CharacterDataHandler"
is "funct
ion (pointer to void, pointer to const char, int) returning void", which
is not 
compatible with "void". (ptrmismatch)
        my_CharacterDataHandler},
--------^
cc: Warning: ./pyexpat.c, line 999: In the initializer for
handler_info[4].handl
er, the referenced type of the pointer value
"my_UnparsedEntityDeclHandler" is "
function (pointer to void, pointer to const char, pointer to const char,
pointer
 to const char, pointer to const char, pointer to const char) returning
void", w
hich is not compatible with "void". (ptrmismatch)
        my_UnparsedEntityDeclHandler },
--------^
cc: Warning: ./pyexpat.c, line 1002: In the initializer for
handler_info[5].hand
ler, the referenced type of the pointer value "my_NotationDeclHandler"
is "funct
ion (pointer to void, pointer to const char, pointer to const char,
pointer to c
onst char, pointer to const char) returning void", which is not
compatible with 
"void". (ptrmismatch)
        my_NotationDeclHandler },
--------^
cc: Warning: ./pyexpat.c, line 1005: In the initializer for
handler_info[6].hand
ler, the referenced type of the pointer value
"my_StartNamespaceDeclHandler" is 
"function (pointer to void, pointer to const char, pointer to const
char) return
ing void", which is not compatible with "void". (ptrmismatch)
        my_StartNamespaceDeclHandler },
--------^
cc: Warning: ./pyexpat.c, line 1008: In the initializer for
handler_info[7].hand
ler, the referenced type of the pointer value
"my_EndNamespaceDeclHandler" is "f
unction (pointer to void, pointer to const char) returning void", which
is not c
ompatible with "void". (ptrmismatch)
        my_EndNamespaceDeclHandler },
--------^
cc: Warning: ./pyexpat.c, line 1011: In the initializer for
handler_info[8].hand
ler, the referenced type of the pointer value "my_CommentHandler" is
"function (
pointer to void, pointer to const char) returning void", which is not
compatible
 with "void". (ptrmismatch)
        my_CommentHandler},
--------^
cc: Warning: ./pyexpat.c, line 1014: In the initializer for
handler_info[9].hand
ler, the referenced type of the pointer value
"my_StartCdataSectionHandler" is "
function (pointer to void) returning void", which is not compatible with
"void".
 (ptrmismatch)
        my_StartCdataSectionHandler},
--------^
cc: Warning: ./pyexpat.c, line 1017: In the initializer for
handler_info[10].han
dler, the referenced type of the pointer value
"my_EndCdataSectionHandler" is "f
unction (pointer to void) returning void", which is not compatible with
"void". 
(ptrmismatch)
        my_EndCdataSectionHandler},
--------^
cc: Warning: ./pyexpat.c, line 1020: In the initializer for
handler_info[11].han
dler, the referenced type of the pointer value "my_DefaultHandler" is
"function 
(pointer to void, pointer to const char, int) returning void", which is
not comp
atible with "void". (ptrmismatch)
        my_DefaultHandler},
--------^
cc: Warning: ./pyexpat.c, line 1023: In the initializer for
handler_info[12].han
dler, the referenced type of the pointer value
"my_DefaultHandlerExpandHandler" 
is "function (pointer to void, pointer to const char, int) returning
void", whic
h is not compatible with "void". (ptrmismatch)
        my_DefaultHandlerExpandHandler},
--------^
cc: Warning: ./pyexpat.c, line 1026: In the initializer for
handler_info[13].han
dler, the referenced type of the pointer value "my_NotStandaloneHandler"
is "fun
ction (pointer to void) returning int", which is not compatible with
"void". (pt
rmismatch)
        my_NotStandaloneHandler},
--------^
cc: Warning: ./pyexpat.c, line 1029: In the initializer for
handler_info[14].han
dler, the referenced type of the pointer value
"my_ExternalEntityRefHandler" is 
"function (pointer to void, pointer to const char, pointer to const
char, pointe
r to const char, pointer to const char) returning int", which is not
compatible 
with "void". (ptrmismatch)
        my_ExternalEntityRefHandler },
--------^

-- 
Email  - m.favas@per.dem.csiro.au        Mark C Favas
Phone  - +61 8 9333 6268, 0418 926 074   CSIRO Exploration & Mining
Fax    - +61 8 9383 9891                 Private Bag No 5, Wembley
WGS84  - 31.95 S, 115.80 E               Western Australia 6913