Make a program (which is perfectly valid code) that outputs Hello, World, even before runtime.

How? Let me explain.

Many languages have a compiler. Some operations are made in the compile-time, and others, in runtime. You trick the compiler to output the text Hello, World in compile-time. The text can be anywhere, like the build log.(Not errors. sorry for invalidating all those answers. at least theres pragma tho)

You can use C, C++ or C#, but I wouldn't encourage you to. It's simply a game breaker.

p.s. I wrote this challenge because the tag compile-time is both unused, and used wrong.

Wouldn't the simple source code Hello, World! be optimal in almost any compiled language where that line is not valid code and the offending line gets printed in an error message?
– Martin EnderJul 5 '17 at 9:15

This is a default warning in GCC; no flags need to be added to achieve this.

The extra byte comes from the -c flag, which successfully compiles the program without linking, which means it accepts not having a main function. However, the resulting output file cannot be executed. If this is unacceptable, then:

Your Answer

If this is an answer to a challenge…

…Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.

…Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
Explanations of your answer make it more interesting to read and are very much encouraged.

…Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.

More generally…

…Please make sure to answer the question and provide sufficient detail.

…Avoid asking for help, clarification or responding to other answers (use comments instead).