emscripten-core / emscripten-core/emscripten

error "Expected an assignment or function call and instead saw an expression no-unused-expressions"

Open
#17,508 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Please include the following in your bug report:

in the generated .js file, the line always report error: Expected an assignment or function call and instead saw an expression no-unused-expressions

The js code is:
(tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(40))>>2)] = tempI64[0],HEAP32[(((buf)+(44))>>2)] = tempI64[1]);

**Version of emscripten/emsdk:**
Please include the output `emcc -v` here

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.17 (fbc532773d84d2bd7da876275671970e792ad1cd)
clang version 15.0.0 (https://github.com/llvm/llvm-project 17e4c217b66305e60657a48f10fe3c428c2fe4d2)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /Users/.../.../.../emsdk/upstream/bin

**Failing command line in full:**
If this is compile or link-time failure please include the full failing command
along with its entire output.

**Full link command and output with `-v` appended:**
Even for runtime issues it helps a lot if you can include the full link command.
Adding `-v` to the link command will show all of the sub-commands run which
can help us diagnose your issue.

emcc command: emcc -lm -lpthread -s WASM=1 -s ASSERTIONS=1 -lproxyfs.js -ferror-limit=0 -o wasm/dist/server.js xxx.c

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.