It is possible (in some implementations) to get yourself into trouble
with this program:
C:\tmp>type foo.c
int main;
Or even this:
C:\tmp>type bar.c
main;
because it will create a public variable with signature
_main
Though most modern implementations won't try to execute a constant and
dump core.
The grand prize winner of the first IOCCC (International Obfuscated C
Code Contest), back in 1984, declared "main" as an array rather than
as a function. (The content of the array was machine code that could
be executed either on a PDP-11 or on a VAX.) The implementations of
the time happily executed the array. It resulted in a rule change for
the following year.
<
http://www0.us.ioccc.org/years.html#1984>, "mullender".
Here's the actual program (I accept no responsibility for the
consequences if you try to run it):
short main[] = {
277, 04735, -4129, 25, 0, 477, 1019, 0xbef, 0, 12800,
-113, 21119, 0x52d7, -1006, -7151, 0, 0x4bc, 020004,
14880, 10541, 2056, 04010, 4548, 3044, -6716, 0x9,
4407, 6, 5568, 1, -30460, 0, 0x9, 5570, 512, -30419,
0x7e82, 0760, 6, 0, 4, 02400, 15, 0, 4, 1280, 4, 0,
4, 0, 0, 0, 0x8, 0, 4, 0, ',', 0, 12, 0, 4, 0, '#',
0, 020, 0, 4, 0, 30, 0, 026, 0, 0x6176, 120, 25712,
'p', 072163, 'r', 29303, 29801, 'e'
};