system
Given the following post, respond as if you're commenting on Reddit:
human
Why are compilers so.. weird?

My first semester of this major is almost complete (today's my final), and something my professor never really explained to me (or the class) is how come compilers run differently?

What I mean is how come when you compile and run a piece of code and it shows up with one or two error messages, and then you copy and paste the same code into a different compiler and it runs successfully with no errors? Can someone explain that concept to me? I still don't understand it.
gpt
There are multiple reasons why you might get an error in one compiler, but not another:

* The compilers are for different languages (duh)
* More subtly, the compilers are for different versions or dialects of the same language - or even technically the same version/dialect, but with different additions to the standard library
* The compilers do support the same versions/dialects, or at least have a sufficiently large overlap, but they have different defaults if you don't specify which version you want.
* You're not passing necessary options correctly because the compilers have different options or the same options have different names
* You're using an option like `-Werror` (causing the compiler to treats warnings as errors) -  different compilers (end even different versions of the same compiler) warn about different things.

This list is very likely not exhaustive. If you give an example of what you're talking about, like which code in which language you tried on which compilers, someone will probably be able to tell you more specifically why it worked on one and not the other.