News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Recent posts

#71
Bug reports / Invalid jump into VLA block
Last post by Marco - September 17, 2025, 04:14:58 PM
Hello,

While maintaining the code for one of my apps, the compiler displayed the following error message:

error #2211: Invalid jump into 'VLA' block.

After running several tests, I managed to identify the cause of the error and reproduce the problem with a simpler project:

#include <excpt.h>
#include <stdio.h>

// function prototype.
void foo(int);

int main(int argc, char *argv[])
{
  return 0;
}
 
void foo(int a)
{
  __try {

      size_t bufSize = 1234;
      char buffer[bufSize];         // <-- (1)
      int b = a ? 1 : 2;            // <-- (2) - Any ternary operator.

  }
  __except (EXCEPTION_EXECUTE_HANDLER) {
      printf("An exception occurred - the code is %x\n", exception_code());
  }
}

The __try-__except statement is based on the example in the help file.
When building, the compiler should give some warnings that can be ignored for the sake of this example.
It seems that the error is caused by the combination of instructions (1) and (2).

Changing instruction (1) to

char buffer[1234];

or instruction (2) to

int b=2;
if (a) b=1;

fixes the issue.

The error occurs whether optimizations are turned on or off, and whether the target processor is 32-bit or 64-bit.
If it's useful, the following options were used with POCC for compilation: -fp:precise -W2 -Gz -Ze -Zx.

Marco
#72
Tips & tricks / Re: Windows API tutorial for F...
Last post by Vortex - September 16, 2025, 08:43:18 PM
Here is a simple example built with Visg and Pelles C V13.
#73
Tips & tricks / Re: Useful website for WIndows...
Last post by larryli - September 15, 2025, 11:06:14 AM
Catch22 Win32 Tutorials
https://www.catch22.net/tuts/
#74
Work in progress / Re: ChatGPT examples
Last post by jurgenve - September 12, 2025, 10:43:00 AM
New here.
I use (as beginner) Pelles C because it has great capabilities.
Though genuine interested in getting to learn the possibilities within the C language, I do not have time to
become expert. I realise that.
Been reading the various post of this topic, is goes from scepticism about GTP to actually discussing the proper prompts, in only three pages and within the span of only 2 years.

AI will never be the holy grail but to give my opinion about quote below: because every human will be able to write a piece of software using only his natural language. So software engineers will become
as obsolete as horses are used today in traffic. The accelerated pace of this technology and investments, even if the return wil be overrated, is incredible by the way.

QuoteYou'll never know when, and if, what is output is really correct, unless yourself are an expert; but if you are such an expert why ask to ChatGPT

My honest view, though one should still (want) be able to write and understand code.
#75
Tips & tricks / Re: Windows API tutorial for F...
Last post by Vortex - September 04, 2025, 10:17:13 PM
An interesting tool available from Vanya's page :

QuoteVISG : A great visual editor for creating a GUI interface. The conversion is into pure API code. In addition to converting code into Freebasic, it also supports other languages: MASM, GCC, FreePascal, etc. It can clone an interface from a ready-made one, there is a built-in simple scripting language, so you can always tweak something additional. The source code is open. Author: Alexander G. Karpov.

https://users.freebasic-portal.de/freebasicru/download.html

https://users.freebasic-portal.de/freebasicru/user-files/visg.zip
#76
Chit-Chat / Re: All IP are baned!
Last post by TimoVJL - September 03, 2025, 09:47:11 AM
#77
Chit-Chat / Re: All IP are baned!
Last post by John Z - September 03, 2025, 12:11:57 AM
HI bitcoin,

Well not much you can do when the government decides on a ban for a country.  You didn't mention the countries, but I'm often in China.  The Great Firewall blocks many, many things.  Many standard VPN's are also blocked.  Karing on GitHUb seems to get through mostly though.  I've tried the top two most often recommended VPN's 'Express' and 'Nord' - 'Nord' always failed, 'Express' could get through occasionally.

The other way to get some service is if your cellular service allows is a mobile hotspot.  Much harder to have a mobile service block.  Not going to be for long downloads though as many hotspot allowances are in the 5gig range or less.  T-Mobile does offer a 50Gig/monthly option.

John Z
#78
Bug reports / Re: Crash IDE with 'asm' keywo...
Last post by John Z - September 02, 2025, 11:59:27 PM
Hi bitcoin,

Confirming your finding.  On Win 11 23H2 it hangs the IDE.  System shows IDE CPU usage goes to 23% with some ups and downs from other things running.  IDE needed to be killed with TM.

John Z
#79
Chit-Chat / All IP are baned!
Last post by bitcoin - September 02, 2025, 10:51:21 PM
After 2 or 3 years, I was finally able to access the forum. All my IPs in one country were blocked. The same happened with the second country. I bought a VPN — same result. I bought a SOCKS proxy — also blocked. Only after buying a second VPN was I able to get in. Why is this happening? What can I do?
#80
Bug reports / Crash IDE with 'asm' keyword
Last post by bitcoin - September 02, 2025, 10:50:15 PM
Write any code with an asm block, for example __asm{ nop; nop; }. Put the cursor between the word asm and the opening brace { and press Enter. The program will freeze and crash