470,862 Members | 1,731 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,862 developers. It's quick & easy.

Compile errors in *.y file (yacc ???)

Hello!

I'm trying to fix code of esnacc to compile it in gcc4.0. I've fixed
almost all c/c++ code, but I've completly no idea about yacc.
Can someone help me how to fix the following warnings:

core/parse-asn1.y: In function 'yyparse':
core/parse-asn1.y:1517: warning: format '%ld' expects type 'long int',
but argument 4 has type 'AsnInt'
core/parse-asn1.y: In function 'InitAsn1Parser':
core/parse-asn1.y:3537: warning: implicit declaration of function
'yyrestart'
Below is the code:

@1515:
else
{
PrintErrLoc (modulePtrG->asn1SrcFileName, $3->lineNo);
fprintf (errFileG, "ERROR - attempt to implicitly reference
untagged type\n");
smallErrG = 1;
}

@3535:
#ifdef FLEX_IN_USE
if (!firstTimeThroughG)
yyrestart (fPtr);

firstTimeThroughG = FALSE;
#endif

best regards
Jarek
Feb 24 '06 #1
1 2375
"Jarek" <ja***@poczta.srv.pl> schrieb im Newsbeitrag
news:dt**********@atlantis.news.tpi.pl...
Hello!

I'm trying to fix code of esnacc to compile it in gcc4.0. I've fixed
almost all c/c++ code, but I've completly no idea about yacc.
Can someone help me how to fix the following warnings:

core/parse-asn1.y: In function 'yyparse':
core/parse-asn1.y:1517: warning: format '%ld' expects type 'long int', but
argument 4 has type 'AsnInt'
core/parse-asn1.y: In function 'InitAsn1Parser':
core/parse-asn1.y:3537: warning: implicit declaration of function
'yyrestart'


Which errors? Those are only warnings. For the first one, check the
definition of AsnInt. If it is typedef'ed as 'long int' or just 'long',
ignore that warning. Otherwise test with a little program that you can
printf a value of type AsnInt when a long int is expected. The second error
you can safely ignore. It just tells you that there is no prototype for
yyrestart, and the compiler simply assumes that the call matches the
definition of that function.

HTH
Heinz
Feb 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by pavel.orehov | last post: by
reply views Thread by Jérôme Le Bougeant | last post: by
5 posts views Thread by Torben Laursen | last post: by
5 posts views Thread by thomas | last post: by
9 posts views Thread by beet | last post: by
1 post views Thread by mh | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.