www.digitalmars.com         C & C++   DMDScript  

c++ - this snippet crash the C compiler

reply "Carlos" <carlos-smith sympatico.ca> writes:
The uncommented line in luaX_setinput() of t.c
compiled with:

  dmc -c -Jm t.c

crash the compiler (scppn.exe): 8.51.0n (WinXP SP2)

If you dont use -Jm the file compiles ok.

The file comes from Lua 5.1.4 distribution (llex.c).

-- t.c --
#include <ctype.h>
#include <locale.h>
#include <string.h>

#include "lua.h"

#include "ldo.h"
#include "llex.h"
#include "lobject.h"
#include "lparser.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "lzio.h"

#define next(ls) (ls->current = zgetc(ls->z))

void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source) {
  //ls->decpoint = '.';
  //ls->L = L;
  //ls->lookahead.token = TK_EOS;  /* no look-ahead token */
  //ls->z = z;
  //ls->fs = NULL;
  //ls->linenumber = 1;
  //ls->lastline = 1;
  //ls->source = source;
  luaZ_resizebuffer(ls->L, ls->buff, LUA_MINBUFFER);  /* initialize buffer 
  //next(ls);  /* read first char */
Sep 25 2008
parent Walter Bright <newshound1 digitalmars.com> writes:
Sep 27 2008