473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 2587
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: pavel.orehov | last post by:
Hi, I am using flex and bizon to write HTTP parser. I am passing well flex and bison tools but can't compile their output. ================= Flex file (http_parser.lpp) ============== %{...
0
by: Jérôme Le Bougeant | last post by:
Hello (and sorry for my English), I downloaded the VideoCapture module on the http://videocapture.sourceforge.net/ site. I tested it with a webcam and that functions. Now I want to...
5
by: Torben Laursen | last post by:
Hi Often I just want to compile one c++ file in a project the check it for errors. Now I can right click on a *.cpp file and select "Compile" But is there a way and short cut to compile a file...
1
by: deepusrp | last post by:
Helo everyone, i am doing a project on some graphic tool using qt as the front end. i am using lex and yacc as parser. now i am facing a problem since yacc generates only c code as i want to...
5
by: Benny the Guard | last post by:
I am writing a parser to handle input commands and process them. There are some builtin in commands that it will recognize one of which is TOK_CMD with another keyword after it (all tokenized based...
5
by: thomas | last post by:
hello I m writing a simple parser using bison. I just used someone's else c++ grammar, to produce a code beutifier. The thing is , most of the actions for productions would have form {$$ = $1 + $2...
9
by: beet | last post by:
Hi, I am really not good at c/c++. Some simple code.. #include <stdio.h> #include <stdlib.h> #include <math.h> #include "simlibdefs.h"
2
by: Andrus | last post by:
I need compile in-memory assembly which references to other in-memory assembly. Compiling second assembly fails with error Line: 0 - Metadata file 'eed7li9m, Version=0.0.0.0, Culture=neutral,...
1
by: mh | last post by:
I'm porting a C lex/yacc based project, and would like to redo it in python. What's the best option for a python lex/yacc-like? I've googled a few things, but wanted to see the current...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.