[Gllug] data segment vs stack

Nix nix at esperi.org.uk
Tue Feb 14 23:25:04 UTC 2006


On Tue, 14 Feb 2006, Christian Smith announced authoritatively:
> main() is just a function like any other C function

Pedant point: not quite. It may have uniquely weird calling conventions,
stack alignment requirements, and so on, although this should be
invisible from within the program.

One difference between C and C++ is that in C++ you aren't allowed to
call main() recursively (which presumably also applies to calling it
from C in a mixed-language program). However, only obfuscated C code
contests ever do things like that anyway.

-- 
`... follow the bouncing internment camps.' --- Peter da Silva
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list