Open mavavilj opened 9 months ago
Not specific to fib.js. Error produced also with, e.g.:
hello.js
// hello world
NOTE:
Possibly the first report of this error, since other Issues seem to be using nectar as opposed to nerd.
Fixable by adding the type std::string to:
Then the compiler finishes.
Also,
node nerd --run hello.ng
[*] Generating source file
[*] Compiling with preset: speed
lto-wrapper: warning: using serial compilation of 2 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
../6yng6/nerdcore/src/./class/fixed_array.h: In member function ‘__ct_comp ’:
../6yng6/nerdcore/src/./class/fixed_array.h:50:50: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
50 | value = new NerdCore::VAR[_length];
| ^
/usr/include/c++/12/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
[*] Executing /root/Downloads/nerd-master/hello
Hello World !
could you try with GCC10 or 9 just to check if it comes from GCC ?
could you try with GCC10 or 9 just to check if it comes from GCC ?
The __NERD_DIRNAME problem persists, but is fixable as I wrote earlier.
in reply to: https://github.com/NerdLang/nerd/issues/161#issuecomment-1909469900
node ../nerd --run hello.js
[*] Generating source file
[*] Compiling with preset: speed
[*] Executing /root/Downloads/nerd-master/example/hello
I am not an expert on GCC, but to me the programming error at L75 and L77 at https://github.com/NerdLang/nerd/blob/400b367708c2fee58060f85fb8546a522c8add9c/self/compiler/native/squel/std.cpp#L75 looks evident, since L73 is never executed and thus the variable is never initialized.
node nerd ../fib-main/fib.js
fib.js: https://github.com/drujensen/fib