Release Candidate for version 13.00 is now available

Started by Pelle, April 02, 2025, 02:27:50 PM

Previous topic - Next topic

John Z

Interesting:

Quote from: TimoVJL on April 22, 2025, 08:44:09 PMEDIT: delete .ppx and close project, after that are files listed in that xml-file normally ?

I first made a backup copy of the ppx file to be 'safe'.  Started V13 - this time there were to my surprise two open tabs.  Then I deleted the ppx file. clicked file save all two tabs still open then closed V13.

Went to look at the .ppx There was NO .ppx file recreated. With no ppx being recreated I started V13 and no files were opened.

Next I closed V13 again. Copied the backup copy to the correct ppx name then restarted V13.  It Opened with two tab showing files.

Now it gets interesting - I closed one tab, did a save all just because, closed V13.  When I restarted V13 TWO tabs were opened even though I closed V13 with one tab open.

Bottom line it under some conditions the .ppx is not being updated, however at least one somehow it was because now instead of no files it always opens with two files....

I manually edited the ppx removing one file.  The V13 always opens with the one file even if closed with two or none showing.

(Note all of the above used the X to close V13, you'll see why important below)

So I did some more testing it appears that when closing V13 with the X the ppx file is not updated, whereas closing V13 with File - Close Project it is updated.  I saw this by watching the file modified time.  So maybe it has been this way I'm not sure, I've almost always used the X because using File - Close Projects takes two steps to shutdown.

Next I deleted the ppx.  Opened V13, opened three files (3 tabs showing) - Used File - Close Project and it recreated the ppx file.  So to me it looks like the X is the issue.

John Z

TimoVJL

#46
https://github.com/scivision/C23-examples

cc.exe wildcard don't work ?

test results:
c99\unreachable.c(13): fatal error #1014: #error: "unreachable() is not implemented for this compiler".
c23\nullptr.c(29): warning #2115: Local 'cloned_zero' is initialized but never used.
c23\nullptr.c(28): warning #2115: Local 'cloned_NULL' is initialized but never used.
c23\reproducible.c(10): error #2603: Invalid attribute [[reproducible]] for identifier 'sum'.

https://c-for-dummies.com/blog/?p=6173
#include <stdio.h>
int main()
{
    int a = 0b11010;
    printf("Decimal: %d\n",a);
    printf("Hex: %x\n",a);
    printf("%b\n",a);
    return 0;
}
May the source be with you

Pelle

Quote from: TimoVJL on April 26, 2025, 09:23:41 AMcc.exe wildcard don't work ?
Compiler optimizer bug (terminates the loop/program, after first compile, with EXIT_FAILURE).
This will take a while to fix...

Quote from: TimoVJL on April 26, 2025, 09:23:41 AMc99\unreachable.c(13): fatal error #1014: #error: "unreachable() is not implemented for this compiler".
c23\nullptr.c(29): warning #2115: Local 'cloned_zero' is initialized but never used.
c23\nullptr.c(28): warning #2115: Local 'cloned_NULL' is initialized but never used.
Sloppy tests...

Quote from: TimoVJL on April 26, 2025, 09:23:41 AMc23\reproducible.c(10): error #2603: Invalid attribute [[reproducible]] for identifier 'sum'.
I could have sworn there was a compiler test for this, but apparently not. Yet another bug to fix.

Quote from: TimoVJL on April 26, 2025, 09:23:41 AM[code]#include <stdio.h>
int main()
{
    int a = 0b11010;
    printf("Decimal: %d\n",a);
    printf("Hex: %x\n",a);
    printf("%b\n",a);
    return 0;
}
What is the problem? Seems to work here...
/Pelle

TimoVJL

That bit-printing example was just for others to see some features, nothing more  ;) 
May the source be with you

Pelle

Quote from: TimoVJL on April 26, 2025, 03:21:06 PMThat bit-printing example was just for others to see some features, nothing more  ;) 
Ah! OK...

Checking the "reproducible.c" case some more, it appears to be wrong (as I read the C23 standard).

WRONG:
[[reproducible]]
int sum(int a, int b){
    return a + b;
}

CORRECT:
int sum(int a, int b) [[reproducible]] {
    return a + b;
}
/Pelle