[kelbt-users] nonterm class Foo
Adrian Thurston
thurston at complang.org
Fri Jan 23 00:42:22 UTC 2009
Hi Elijah,
I'm of the opinion that all includes should be at the top of an input
file. But since Kelbt doesn't automatically generate code near the top
of a file I'm of the opinion that the user should include new if they
use the 'class' feature.
Adrian
Elijah Epifanov wrote:
> bugreport:
>
> when using 'nonterm class Foo' construct the generated parser uses
> placement new operator:
>
> %%
> case 1: {
> new(redLel->user.E) Parser_Lel_E();
> %%
>
> however, (at least on my system) placement new cannot be used without
> #inclding <new>.
> %%
> calc2.cpp: In function 'int parseLangEl(int, const Token*)':
> calc2.cpp:653: error: no matching function for call to 'operator
> new(long unsigned int, char [8])'
> <built-in>:0: note: candidates are: void* operator new(long unsigned int)
> %%
>
> This happens on:
>
> Debian sid/exp:
> libc6-dev 2.7-18
> g++ (Debian 4.3.2-2) 4.3.3 20090110 (prerelease)
>
> MacOS X (macports 1.700):
> g++ (GCC) 4.0.1 (Apple Inc. build 5490)
> g++ (GCC) 4.2.1 (Apple Inc. build 5566)
> g++ (GCC) 4.3.2
> g++ (GCC) 4.4.0 20081128 (experimental)
>
> Fix is very simple - #include <new>
>
> _______________________________________________
> kelbt-users mailing list
> kelbt-users at complang.org
> http://www.complang.org/mailman/listinfo/kelbt-users
More information about the kelbt-users
mailing list