New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ compiler fails when compile using -ecc option (__cdecl calling convention) #1187
Comments
I can confirm this issue. It is also an issue for wpp386 on my Windows 11 system. The |
It looks like bug in calling convention classification in c++ compiler. |
Yes, wcc works OK. |
This is the original
But I didn't find any During setup, I remember selected only Yes, if native binaries are essential for targets, then it better force the installation, or give a warning. I'll confirm if it works with default installation. But |
Sorry you mixed two problems together. |
This is not related to issue but only note. |
OK, cool.
So I created another simple test case |
I don't understand why you use -ecc option because it is for special use. |
because I there was some functions being called by assembly, when I ported my code to ow2 (the code works for some other compilers with __cdecl as default), I just want to make sure there's not any bugs related to calling conventions so I could narrow down the problem. The initial purpose using -ecc is just to avoid review/debug the code blindly to find the crash, it is useful when porting codes to ow2 . - if it works with -ecc, then I can take further steps to find the functions. if it doesn't then I will keep -ecc temporarily and skip the calling convention check and try to find the crash for other reasons, and after the crash is fixed, I will remove ecc again to the previous step. then later I found that functions without __cdecl still works with assembly codes using stack to pass 1 or 2 parameters. I didn't read the programming guide carefully so I might be wrong about that. Anyway my problem has been solved (multiple reason of crahses) and I've also checked the code carefully and added __cdecl for the functions with parameters called by assembly. |
-ecc change globaly all functions, except functions which have declared calling convention exactly.
|
yes I just wanted to globally change all, to narrow down the problem a bit as a first step. that why I used -ecc. |
Try to use -3s instead of -ecc it should works. |
Cool, thanks for the tip, I forgot the register usage can be changed via command line. It might help me next time. |
Take into account diference between -ecc and -3s (both use cdecl calling convention). |
Code: ecc.cpp
Command line:
wpp ecc.cpp -bt=dos -fr -ecc -fo=ecc.obj
Output
The text was updated successfully, but these errors were encountered: