Dear friends,
I just started to use Pelles C for Win32 because I wanted to test an alternative to VisualStudio express.
While I'm giving a positive feedback, I must say that I'm having some strange messages with traditional code.
Just take this example:
int sum();
int sum(a, b)
int a;
int b;
{
return a+b;
}
This is a perfectly legal, old style declaration, but I'm getting this message in the output window:
warning #2027: Missing prototype for 'sum'.
The second curious thing, it seems that function declarations do not inherit the class specified in the function prototypes, let's take this other example:
static int sum();
int sum(a, b)
int a;
int b;
{
return a+b;
}
Here the compiler says:
warning #2027: Missing prototype for 'sum'.
warning #2166: Inconsistent linkage for 'sum', previously declared at C:\test\test.c(1).
Funny thing that first it says that prototype is missing and then that declaration does not match with the previously declarated prototype.
Last thing, the compiler correctly signaled that some functions won't return because some infinite loops (warning #2134) but I perfectly know that: is there a keyword, perhaps similar to __attribute__((noreturn)) in GCC, to signal that the function won't return?
Keep up the good work!
Sincerely,
Carlo Bramini.
PS: I know that warning #2027 (but not warning #2166, that seems to be without solution) can be fixed by rewriting function declarations in the new style, but unfortunately I'm not allowed to do big changes in the source codes.
PPS: I discovered that my executables are depending of pocrt.dll: I was also wondering what the reasons are for forcing you to not use msvcrt instead.
Has been this choice taken for granting exact source compatibility between Win32 and WinMobile platforms? Have you ever evaluated the chance to add an option for linking to msvcrt too in addition to pocrt when working with win32 platform?