emscripten-core / emscripten-core/emscripten
3.1.31 regression: -sMODULARIZE and -sSTRICT_JS don't work together
Open
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Minimal reproduction:
```sh
echo "int main(){}" > tmp.c
emcc tmp.c -o ./tmp.js -sSTRICT_JS -sMODULARIZE
node tmp.js
```
With Emscripten 3.1.30 this outputs nothing and returns with exit status 0. With Emscripten 3.1.31 it throws:
```
[error] tmp.31.js: SyntaxError: Illegal 'use strict' directive in function with non-simple parameter list. (6:1)
[error] 4 | if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
[error] 5 | return (
[error] > 6 | function(Module = {}) {
[error] | ^
[error] 7 |
[error] 8 | // include: shell.js
[error] 9 | "use strict";
```
Contributor guide
Assessment
This issue has not been assessed yet.