[cfe-dev] error when using "int32_t main (int32_t argc, char * argv[])"

Robert Lytton robert at xmos.com
Fri Oct 4 02:09:31 PDT 2013


> The problem is that 'main' is required to take a parameter of type 'int' and return a value of type 'int', and 'int32_t' is not necessarily 'int'.
> The correct solution is to fix the code to use the right types, as you suggested.

Thanks Richard.
This then leads to the question why the code builds without an error if the "--target" is not specified (not checked  permutations).
By the way 'int32_t' is 'int' in this situation.
It would be nice if there was consistency...

Robert


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131004/33cbad7f/attachment.html>


More information about the cfe-dev mailing list