emscripten-core / emscripten-core/emscripten
Closure compiler error for glClientWaitSync arguments
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
When compiling with `-Oz -g0 --closure=1`, the compiler complains that `timeout_high` is not defined.
Error:
```sh
building:ERROR: /tmp/emscripten_temp_ve4g83xy/GeometryViewer.jso5.js:50:4095: ERROR - [JSC_UNDEFINED_VARIABLE] variable timeout_high is undeclared
```
For some reason, the generated code for that function `glClientWaitSync` doesn't have `timeout_high` in it's arguments. It thinks that parameter is unused?
```js
/** @suppress {duplicate } */ function _glClientWaitSync(sync, flags, timeout_low) {
sync >>>= 0;
var timeout = convertI32PairToI53(timeout_low, timeout_high);
return GLctx.clientWaitSync(GL.syncs[sync], flags, timeout);
}
```
**Version of emscripten/emsdk:**
Please include the output `emcc -v` here
```
|-> $ emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.46 (19607820c447a13fd8d0b7680c56148427d6e1b8)
clang version 18.0.0 (https://github.com/llvm/llvm-project 75501f53624de92aafce2f1da698b249a7293dc7)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/local/KHQ/jaswant.panchumarti/Documents/code/emsdk/upstream/bin
```
Contributor guide
Assessment
This issue has not been assessed yet.