From: Jesus Calvino-F. <Je...@ec...> - 2002-08-13 01:18:16
|
Just changed the versions of Bison and Flex (for a non related matter), and everything works fine now. Any idea of what happened? At 02:34 PM 8/11/02 -0700, Jesus Calvino-Fraga wrote: >Hi all, > >Thanks to Borut I was finally able to compile sdcc with VC. Then I >recompiled some of my sdcc projects with this newly generated sdcc and >encounter a problem. > >When compiling the file included below (both in Windows 98 and Windows xp): > >c:\sdcc\bin\sdcc --model-large --stack-after-data -c lonlat.c > >I get this Windows message: > > >This program has performed an illegal operation > >and will be shut down. > > > >If the problem persists, contact the program > >vendor. > >And when I click in 'Debug', Visual Studio opens the file >'C:\sdcc\src\SDCCcast.c' and points to line 2176 containing 'if (SPEC_SCLS >(tree->left->etype) == S_REGISTER)'. After some trial and error I found >that the problem goes away if I add 'const ' in front of '_city >loc[3]='. When compiling with old sdcc Windows versions found on the >daily snapshot directory, the compiler works fine. Any help? > >---File: lonlat.c Cut here--- > >#include <stdio.h> > >typedef struct >{ > float lat; > float lon; > float zone; > char * name; >} _city; > >_city loc[3]= >{ > {49.15, -123.07, -8.0, "Vancouver BC, Canada"}, > {10.58, -66.93, -4.0, "Caracas DF, Venezuela"}, > {40.75, -74.00, -5.0, "New York NY, USA"} >}; > >void main(void) >{ > int j; > > for(j=0; j<3; j++) > { > printf( "Lon: %7.2f; Lat: %6.2f (%s)\n", loc[j].lon, > loc[j].lat, loc[j].name ); > } >} > >---Cut here--- > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >sdcc-devel mailing list >sdc...@li... >https://lists.sourceforge.net/lists/listinfo/sdcc-devel |