Re: warning: assignment makes pointer from integer without a cast[enabled by default] yylval=atoi(yytext);

George Neuner <gneuner2@comcast.net>
Wed, 24 Feb 2016 13:07:29 -0500

          From comp.compilers

Related articles
Re: warning: assignment makes pointer from integer without a cast[enab dannyjpereira@gmail.com (Danny Pereira) (2016-02-22)
Re: warning: assignment makes pointer from integer without a cast[enab 330-706-9395@kylheku.com (Kaz Kylheku) (2016-02-24)
Re: warning: assignment makes pointer from integer without a cast[enab gneuner2@comcast.net (George Neuner) (2016-02-24)
| List of all articles for this month |
From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.compilers
Date: Wed, 24 Feb 2016 13:07:29 -0500
Organization: A noiseless patient Spider
References: 16-02-003
Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="55785"; mail-complaints-to="abuse@iecc.com"
Keywords: yacc, debug
Posted-Date: 24 Feb 2016 23:55:14 EST

On Mon, 22 Feb 2016 09:28:49 +0530, Danny Pereira
<dannyjpereira@gmail.com> wrote:


    < snipped - program code >




>*$lex purelex.l followed with *


Lex is not reentrant, so you must be using _Flex_.


>When I compile using gcc I am getting following warning *
>
>*purelex.l:12:8: warning: assignment makes pointer from integer without a
>cast [enabled by default] yylval=atoi(yytext); *


The default yylval type is a pointer. Look at Bison's %union
directive and see how it modifies the %token directive.




>*Also I would like to restrict first thread to process fist 6 line and
>second thread to process next six lines which is not happening right now..*


First make it work without threads. Then make it work with 1 thread.
Look carefully for an error in scanfunc().


George


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.