Assembly and C... Small Problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Iamryan2002

Assembly and C... Small Problem

Post by Iamryan2002 »

I have made a function that seperates the command line so that it takes args, however, getting it to work is a pain, I get this error:

Warning system.c 35: Non-portable pointer assignment in function main

I have no idea what tcc is tring to tell me? Any help is appriciated. Thanks..
Schol-R-LEA

RE:Assembly and C... Small Problem

Post by Schol-R-LEA »

Well... first off, since it is a warning rather than an error per se, you should still be able to proceed. As for what it means, it is fairly straightforward: the pointer assignment that you used is 'non-portable', which is to say, it relies on the details of the PC platform, and would have to be rewritten on a different type of computer.

At least, that is what the warning means. It is, however, likely that it is a sign of a more serious problem. Without seeing the source code, however, I could give you more of any answer than that. Could you please post the function in question?

You are using Turbo C/C++, I note. What version? Is it a DOS or Windows version (I am assuming the former)?  Is it generating real mode or protected mode code, or do you use it for both? The last is the most important question, as it has implications about how pointers are used.
Post Reply