Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1670

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

From George Neuner <gneuner2@comcast.net>
Newsgroups comp.compilers
Subject Re: warning: assignment makes pointer from integer without a cast[enabled by default] yylval=atoi(yytext);
Date 2016-02-24 13:07 -0500
Organization A noiseless patient Spider
Message-ID <16-02-007@comp.compilers> (permalink)
References <16-02-003@comp.compilers>

Show all headers | View raw


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

Back to comp.compilers | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: warning: assignment makes pointer from integer without a cast[enabled by default] yylval=atoi(yytext); Danny Pereira <dannyjpereira@gmail.com> - 2016-02-22 09:28 +0530
  Re: warning: assignment makes pointer from integer without a cast[enabled by default] yylval=atoi(yytext); Kaz Kylheku <330-706-9395@kylheku.com> - 2016-02-24 15:56 +0000
  Re: warning: assignment makes pointer from integer without a cast[enabled by default] yylval=atoi(yytext); George Neuner <gneuner2@comcast.net> - 2016-02-24 13:07 -0500

csiph-web