mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improve the error message when the compilation does not produce any files #1390.
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
- Introduce `$vaarg[...]` syntax and deprecate the old `$vaarg(...)`.
|
||||
- Similar change to `$vasplat`: `$vasplat` and `$vasplat[1..]`.
|
||||
- Add `$member.get(value)` to replace `value.$eval($member.nameof)`
|
||||
- Improve the error message when the compilation does not produce any files #1390.
|
||||
|
||||
### Fixes
|
||||
|
||||
|
||||
@@ -510,7 +510,16 @@ void compiler_compile(void)
|
||||
}
|
||||
if (!output_file_count)
|
||||
{
|
||||
error_exit("No output files found.");
|
||||
if (output_exe)
|
||||
{
|
||||
error_exit("No output files were generated. This may happen if the program is not "
|
||||
"linked with anything and all the code is optimized away.");
|
||||
}
|
||||
else
|
||||
{
|
||||
error_exit("No output files were generated. This may happen if there were no exported functions "
|
||||
"and all the other code was optimized away.");
|
||||
}
|
||||
}
|
||||
|
||||
CompileData *compile_data = ccalloc(sizeof(CompileData), output_file_count);
|
||||
|
||||
Reference in New Issue
Block a user