Recent Posts

Pages: 1 2 [3] 4 5 ... 10
Bug reports / Re: Simple argument bug
« Last post by gjacc on May 22, 2020, 10:20:46 am »
On my PC (Win 10) the ouput is :

And here we go: < 0.000000 , 25.000000 >
This was to be: < 0.000000 , 25.000000 >
Press any key to continue...
Announcements / Server problems due to an issue at the provider
« Last post by Christian on May 19, 2020, 09:22:36 am »

since 13.05.2020 we have trouble with the provider because all of their virtual server systems have performance problems or they are partly not reachable. They struggle with an error in ther virtualization software.

I will keep my eyes on it and please be patient, until the problem is solved.

Best regards

Bug reports / Re: Simple argument bug
« Last post by Pelle on May 17, 2020, 11:33:03 pm »
It works with the upcoming version, so I''m not going to dig into this any further...
Windows questions / Re: Depracated functions
« Last post by Pelle on May 17, 2020, 11:30:47 pm »
Well, the idea was to instead use ISO TR24731-1 and TR24731-2 (see Appendix in help file): functions optionally part of standard C. The problem is that few vendors have bothered to implement these functions. With new people on the C Standards Committee, there seem to be interest in removing TR24731-1 and TR24731-2.

I don't really know what is best right now. Since <strsafe.h> is mostly a bunch of inline functions, you always have the option of making it a private copy and remove the deprecate annotations.
I became acquainted with Pelles work by simply googling "C ide for windows".
Visual studio is kinda nice for C++ and such work in windows side, but its C-support has always been something of a bastard child.

Pelles C seems to be filling a lovely niche for me, when it comes to using pure C ( unlike the god-knows what subset enforced by visual studio ) in conjunction with learning more about x86/64 assembly.

It's light-weight, a bit quirky, but simple, non-bloated, rather simple to use and free.
What's there not to like?

I think the current situation is a matter of timing, kinda....
These days, most programmers start and end at highest level languages, never bothering to stop at C, let alone assembly, especially in windows side.

The niche is always alive and well, but in the grand scheme of things, IDE like this has a hard time attracting mainstream appeal.
I think the whole compiler/ide/assembler package is amazing for what it is, but try explaining it to a "modern" programmer.  :-\

Overall, a lovely IDE for windows side.
It's currently my primary lower-than-c++ developing environment.
Windows questions / Depracated functions
« Last post by apabird on May 17, 2020, 01:42:19 pm »
I was playing with the Win32 API and PellesC had given me the this warning:

...main.c(93): warning #2260: The name 'StringCchPrintfW' is marked as deprecated.

Are Strsafe.h functions deprecated? What else should I use on Windows10?
Bug reports / Re: Simple argument bug
« Last post by frankie on May 16, 2020, 03:54:23 pm »
Bug verified.
The problem doesn't seem related to arguments pass, but to code generation bug. This suspect is enforced due to the problem persistence even when compiling with different optimizations, include no optimization at all.
As showed in the image attached the whole swapping code for the first element is not emitted.
Indeed the reverse works. I.e. reversing the structure element to swap as in:
Code: [Select]
int main(void)
struct Two_Floats values = { -50.0f, 25.0f };
// struct Two_Floats values = { 50.0f, 625.0f };
struct Two_Floats limits = { 0.0f, 600.0f };

struct Two_Floats broken = broken_Function(limits, values);
struct Two_Floats working = working_Function(limits, values);

printf("And here we go: < %f , %f > \n", broken.hi, broken.lo);
printf("This was to be: < %f , %f > \n", working.hi, working.lo);
return 0;
Demonstrating that the code for the second element swap is correctly emitted and the parameter passage and return value works correctly.
As a consequence the code generator is buggy steady to not emit due code.
Bug reports / Simple argument bug
« Last post by Tom on May 15, 2020, 06:11:51 pm »
This is so elementary, that I'm sure someone must have reported it at some point...
However, could not find a matching report at a quick glance, so might as well push it here, even if it ends up being a duplicate and wasting everyones time.

Here is a tiny program that demonstrates the issue:

Code: [Select]

#include <stdio.h>

struct Two_Floats
float hi;
float lo;

struct Two_Floats broken_Function( struct  Two_Floats clips ,  struct Two_Floats values )
if( values.hi <= clips.hi ) values.hi = clips.hi;
if( values.lo >= clips.lo ) values.lo = clips.lo;
return values;

struct Two_Floats working_Function( struct  Two_Floats clips ,  struct Two_Floats values )
struct Two_Floats temporary = values;

if( temporary.hi <= clips.hi ) temporary.hi = clips.hi;
if( temporary.lo >= clips.lo ) temporary.lo = clips.lo;
return temporary;

int main( void )
struct Two_Floats  values = { -50.0f , 25.0f  };
struct Two_Floats  limits = {   0.0f , 600.0f };

struct Two_Floats  broken =  broken_Function( limits , values );
struct Two_Floats working = working_Function( limits , values );

printf("And here we go: < %f , %f > \n", broken.hi  , broken.lo  );
printf("This was to be: < %f , %f > \n", working.hi , working.lo );
return 0;

Code: [Select]
And here we go: < -50.000000 , 25.000000 >
This was to be: < 0.000000 , 25.000000 >
Press any key to continue...

Modifying the the pass-by-value argument and returning it gives a wrong result.
Taking a temporary copy and returning it, won't.

Using version 9.009 at windows 10.
Same behavior occurs on both default debug and release configuration, with fast and strict floating point settings.

Beginner questions / How to run this program ?
« Last post by ahmadrabbas on May 11, 2020, 11:27:44 pm »
Beginner questions / Re: return 0, before the code is finished ?
« Last post by John1 on May 11, 2020, 12:38:53 pm »
Hello JohnZ,

You are right, it is a syntax error, due the =.

Just now I have some Problems with the Content in the File, but it is another topic.

Thanks a lot

Kind regards
Pages: 1 2 [3] 4 5 ... 10