Skip to content

Compiler behaviour on -o foo and no input files #12497

@shindere

Description

@shindere

gcc -o foo says gcc: fatal error: no input files and fails (exit code 1).

When given -o foo as arguemnts, both ocamlc and ocamlopt will succeed
(exit with 0), emit no error message but not write an executable file either.

Am I correct that this is a bug rather than a feature?

Would be happy to provide a fix because, while working on the compiler's
build system, I'm regularly bitten by this when, for some reason,
the GNU make variable that is supposed to contain the list of input
files turns out to be empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions