NO

Author Topic: Version 6.50, Release Candidate #2 available  (Read 18704 times)

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Version 6.50, Release Candidate #2 available
« on: October 23, 2010, 07:29:04 PM »
Pelles C version 6.50, Release Candidate #2, is now available for download:
http://www.smorgasbordet.com/pellesc/download.htm

German translation, bugfixes in the compiler and IDE, syntax highlighting and help for (most) intrinsics in the source code editor.

Pelle
/Pelle

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: Version 6.50, Release Candidate #2 available
« Reply #1 on: October 23, 2010, 09:51:14 PM »
Great :P, thank you, I will look at it! :)

Edit: my first tests run good!  ;D
« Last Edit: October 23, 2010, 10:45:16 PM by AlexN »
best regards
 Alex ;)

Offline Robert

  • Member
  • *
  • Posts: 247
Re: Version 6.50, Release Candidate #2 available
« Reply #2 on: October 23, 2010, 10:23:48 PM »
When using the BCX BASIC to C translator .exe compiled with either  Pelle's C Version 6.50, Release Candidate #1 or Pelle's C Version 6.50, Release Candidate #2,  most of the lines in the C file output by the BCX translator contain a double CR/LF, that is, 0D0A0D0A instead of 0D0A.

This problem does not occur when the BCX translator is compiled with the Microsoft C/C++ compiler.

Robert Wishlaw

Offline MrBcx

  • Global Moderator
  • Member
  • *****
  • Posts: 191
    • Bcx Basic to C/C++ Translator
Re: Version 6.50, Release Candidate #2 available
« Reply #3 on: October 24, 2010, 01:50:47 AM »
Pelle,

Thank you for RC2.

Unfortunately, I must concur with Robert's report of the double CRLF's ...  :(

The good news is that RC2 compiles BCX 6.2.1 in 1 minute 5 seconds, much faster than the 5 minutes 40 seconds of RC1

By way of comparison, Microsoft 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 compiles BCX 6.2.1 in 0 minutes 35 seconds

BCX compiled with Pelles C translates itself 15% faster than BCX compiled with MSVC... ;D

I hope this was helpful.
Bcx Basic to C/C++ Translator
https://www.BcxBasicCoders.com

Offline Vortex

  • Member
  • *
  • Posts: 868
    • http://www.vortex.masmcode.com
Re: Version 6.50, Release Candidate #2 available
« Reply #4 on: October 24, 2010, 02:08:20 PM »
Thanks for this new release.
Code it... That's all...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2116
Re: Version 6.50, Release Candidate #2 available
« Reply #5 on: October 25, 2010, 05:56:52 PM »
This version can compile SQLite 3.7.3 amalgamation version.
Good work Pelle !
May the source be with you

lamer

  • Guest
Re: Version 6.50, Release Candidate #2 available
« Reply #6 on: October 25, 2010, 10:58:33 PM »
Thank you, Pelle - get_rule error has gone! :)

There are some other "features" I have discovered.
The first one:
Create include file dummy.h with single definition
Code: [Select]
#ifndef __DUMMY_H__
#define __DUMMY_H__
int __cdecl dummyfunc(int);
#endif // DUMMY_H__

Create folder MyInclude under C:\Program Files\PellesC
Put dummy.h into MyInclude
Add MyInclude to Folders in Tools->Folders->Options->Include
Rebuild sysdefs.tag
Add #include <dummy.h> to project source file
Try to compile and get the following error:
fatal error #1035: Can't find include file <dummy.h>

Move MyInclude folder to C:\Program Files\PellesC\Include
Add it to Folders in Tools->Folders->Options->Include (removing the old one)
Rebuild sysdefs.tag
Try to compile and get the same error:
fatal error #1035: Can't find include file <dummy.h>

Copy (not cut) dummy.h from MyInclude to C:\Program Files\PellesC\Include
Try to compile - everything is OK!

Add
Code: [Select]
int a = dummyfunc(1) to source file;
Obviously it will fail on build, because we don't have .lib file, but we are speaking about compilation.
Compile - ok, right click on dummyfunc, choose "Go to definition of:", dummy.h file is opened.
Right click on dummy.h tab, choose "Open containing folder":
C:\Program Files\PellesC\Include\MyInclude is opened!

A bit strange behavior, isn't it? Also I noticed that when I add any external folder to includes, the error message from my post http://forum.pellesc.de/index.php?topic=3323.msg12674#msg12674 comes back.

The second one:
In debugging mode background of current line remains pink when you leave debugged procedure, even after pressing F5  - it badly confuses, because you think you are still in debugging.

The last "feature":
Main toolbar loses focus after click on any other project window ("Auto", "Watch", "Locals" etc). In order to bring focus back to main toolbar you should click in source code area (clicking on IDE window does nothing).

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Version 6.50, Release Candidate #2 available
« Reply #7 on: October 27, 2010, 03:18:13 PM »
Robert, MrBCX regarding double CR/LF:
I don't know much about the BCX translator, nor how to use it. I'm not terribly interested in going through a big auto-translated C file to find a *possible* bug (it could be anything, at this point). Can you boil down the problem to a C file of a more manageble size?

/Pelle

Offline MrBcx

  • Global Moderator
  • Member
  • *****
  • Posts: 191
    • Bcx Basic to C/C++ Translator
Re: Version 6.50, Release Candidate #2 available
« Reply #8 on: October 28, 2010, 03:42:33 AM »
Robert, MrBCX regarding double CR/LF:
I don't know much about the BCX translator, nor how to use it. I'm not terribly interested in going through a big auto-translated C file to find a *possible* bug (it could be anything, at this point). Can you boil down the problem to a C file of a more manageble size?

Pelle,

BCX uses simple disk i/o as you'll see in the samples from the generated BCX source code below.


The first 36 lines are emitted correctly - only one crlf

// *********************************************************************
// Created with BCX32 - BASIC To C/C++ Translator (V) 6.2.2 (2010/10/24)
//                 BCX (c) 1999 - 2009 by Kevin Diggins
// *********************************************************************
//              Translated for compiling with a C Compiler
// *********************************************************************
#define WIN32_LEAN_AND_MEAN // limits reading seldom used header files
#include <windows.h>    // Win32 Header File
#include <windowsx.h>   // Win32 Header File
#include <commctrl.h>   // Win32 Header File
#include <commdlg.h>    // Win32 Header File
#include <mmsystem.h>   // Win32 Header File
#include <shellapi.h>   // Win32 Header File
#include <shlobj.h>     // Win32 Header File
#include <richedit.h>   // Win32 Header File
#include <wchar.h>      // Win32 Header File
#include <objbase.h>    // Win32 Header File
#include <ocidl.h>      // Win32 Header File
#include <winuser.h>    // Win32 Header File
#include <olectl.h>     // Win32 Header File
#include <oaidl.h>      // Win32 Header File
#include <ole2.h>       // Win32 Header File
#include <oleauto.h>    // Win32 Header File
#include <conio.h>
#include <direct.h>
#include <ctype.h>
#include <io.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <setjmp.h>
#include <time.h>
#include <stdarg.h>
#include <process.h>
// *************************************************


These are the BCX statements that emit the includes above



  fprintf(Outfile,"%s\n","// *********************************************************************");

  fprintf(Outfile,"%s%s\n","// Created with BCX32 - BASIC To C/C++ Translator (V) ",Version);

  fprintf(Outfile,"%s\n","//                 BCX (c) 1999 - 2009 by Kevin Diggins");

  fprintf(Outfile,"%s\n","// *********************************************************************");

 
  fprintf(Outfile,"%s\n","#include <windows.h>    // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <windowsx.h>   // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <commctrl.h>   // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <commdlg.h>    // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <mmsystem.h>   // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <shellapi.h>   // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <shlobj.h>     // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <richedit.h>   // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <wchar.h>      // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <objbase.h>    // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <ocidl.h>      // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <winuser.h>    // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <olectl.h>     // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <oaidl.h>      // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <ole2.h>       // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <oleauto.h>    // Win32 Header File ");

  fprintf(Outfile,"%s\n","#include <conio.h>");

  fprintf(Outfile,"%s\n","#include <direct.h>");

  fprintf(Outfile,"%s\n","#include <ctype.h>");

  fprintf(Outfile,"%s\n","#include <io.h>");

  fprintf(Outfile,"%s\n","#include <math.h>");

  fprintf(Outfile,"%s\n","#include <stdio.h>");

  fprintf(Outfile,"%s\n","#include <string.h>");

  fprintf(Outfile,"%s\n","#include <stddef.h>");

  fprintf(Outfile,"%s\n","#include <stdlib.h>");

  fprintf(Outfile,"%s\n","#include <setjmp.h>");

  fprintf(Outfile,"%s\n","#include <time.h>");

  fprintf(Outfile,"%s\n","#include <stdarg.h>");

  fprintf(Outfile,"%s\n","#include <process.h>");

  fprintf(Outfile,"%s\n","");






The remaining 40,000+ lines are emitted incorrectly -- two crlf


Nothing special ... just lots more fprint statements.


      fprintf(Outfile,"%s\n","// END BCXRTHEADER\n\n");

      fprintf(Outfile,"%s\n","");

      fprintf(Outfile,"%s\n","int main(int argc, char *argv[])");



This problem does not exist when compiled with Pelles C 6.00 or earlier,  MSVC 8.0,  Lcc-Win32, or Borland's Bcc55.   

Bcx Basic to C/C++ Translator
https://www.BcxBasicCoders.com

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2116
Re: Version 6.50, Release Candidate #2 available
« Reply #9 on: October 30, 2010, 01:20:32 PM »
BCX CR/LF

Error in speed optimization ?
Where is strlen code ?
Code: [Select]
CPU Disasm
Address   Hex dump          Command                                  Comments
004054AC  |. /EB 55         JMP SHORT 00405503

4520      Z[0]=0;
004054AE  |> |C605 1C550503 /MOV BYTE PTR DS:[305551C],0

4521      fgets(Z,1048576,FP2);
004054B5  |. |A1 C84F0403   |MOV EAX,DWORD PTR DS:[3044FC8]
004054BA  |. |50            |PUSH EAX                                ; /Arg3 => [3044FC8] = 0
004054BB  |. |68 00001000   |PUSH 100000                             ; |Arg2 = 100000
004054C0  |. |68 1C550503   |PUSH OFFSET 0305551C                    ; |Arg1 = bcx-test.305551C
004054C5  |. |E8 A6840700   |CALL 0047D970                           ; \bcx-test.0047D970
004054CA  |. |83C4 0C       |ADD ESP,0C

4522      if(Z[strlen(Z)-1]==10)Z[strlen(Z)-1]=0;
004054CD  |. |8B85 F4F7FFFF |MOV EAX,DWORD PTR SS:[LOCAL.515]
004054D3  |. |48            |DEC EAX
004054D4  |. |80B8 1C550503 |CMP BYTE PTR DS:[EAX+305551C],0A
004054DB  |. |75 0E         |JNE SHORT 004054EB
004054DD  |. |8B85 F4F7FFFF |MOV EAX,DWORD PTR SS:[LOCAL.515]
004054E3  |. |48            |DEC EAX
004054E4  |. |C680 1C550503 |MOV BYTE PTR DS:[EAX+305551C],0

4523      fprintf(FP3,"%s\n",Z);
004054EB  |> |68 1C550503   |PUSH OFFSET 0305551C                    ; /<%s> = ""
004054F0  |. |68 17C04B00   |PUSH OFFSET 004BC017                    ; |Format = "%s"
004054F5  |. |A1 C44F0403   |MOV EAX,DWORD PTR DS:[3044FC4]          ; |
004054FA  |. |50            |PUSH EAX                                ; |Arg1 => [3044FC4] = 0
004054FB  |. |E8 C0660700   |CALL 0047BBC0                           ; \bcx-test.0047BBC0
00405500  |. |83C4 0C       |ADD ESP,0C
00405503  |> \A1 C84F0403   |MOV EAX,DWORD PTR DS:[3044FC8]
00405508  |.  50            |PUSH EAX                                ; /Arg1 => [3044FC8] = 0
00405509  |.  E8 92BBFFFF   |CALL 004010A0                           ; \bcx-test.004010A0
0040550E  |.  59            |POP ECX
0040550F  |.  85C0          |TEST EAX,EAX
00405511  |.^ 74 9B         \JE SHORT 004054AE
00405513  |.  C685 00F8FFFF MOV BYTE PTR SS:[LOCAL.512],0
May the source be with you

Offline MrBcx

  • Global Moderator
  • Member
  • *****
  • Posts: 191
    • Bcx Basic to C/C++ Translator
Re: Version 6.50, Release Candidate #2 available
« Reply #10 on: October 30, 2010, 02:06:11 PM »
BCX CR/LF

Error in speed optimization ?

BINGO!

Nice detective work timovjl !

Compiling with /Os fixes the problem and /Ot causes the problem in RC 6.50

Bcx Basic to C/C++ Translator
https://www.BcxBasicCoders.com

Offline Robert

  • Member
  • *
  • Posts: 247
Re: Version 6.50, Release Candidate #2 available
« Reply #11 on: October 30, 2010, 06:43:37 PM »
BCX CR/LF

Error in speed optimization ?

BINGO!

Nice detective work timovjl !

Compiling with /Os fixes the problem and /Ot causes the problem in RC 6.50



The problem also exists with a BCX compiled with the /Ox option.

Robert Wishlaw


Monolith

  • Guest
Re: Version 6.50, Release Candidate #2 available
« Reply #12 on: November 06, 2010, 12:32:24 AM »
The __cdecl directive appears to not work. For example:
Code: [Select]
static int __cdecl LookupCompare(WINDOW_LOOKUP *w1, WINDOW_LOOKUP *w2)
{
    // compare
}

I keep getting this warning when I have code that points to the above function. (It doesn't appear when I switch the compiler convention to __cdecl.)
Quote
Assignment of 'int __stdcall function(const void *, const void *)' to 'int __cdecl function(const void *, const void *)

lamer

  • Guest
Re: Version 6.50, Release Candidate #2 available
« Reply #13 on: November 07, 2010, 10:34:28 PM »
If you type something in source file and then close IDE - the file is saved without prompt.
If you close only the tab with source file, but not IDE - the prompt to save changes appears.
It's a bit dangerous to save without prompting :)

ianammo

  • Guest
Re: Version 6.50, Release Candidate #2 available
« Reply #14 on: November 18, 2010, 12:46:17 AM »
Only recently discovered Pelles C, and have been doing some testing with RC2, all going well.  However there seems to be missing a header file - If I include <emmintrin.h> or <xmmintrin.h>, compile gives warning - "Can't find include file <mmintrin.h>". Have checked, and file doesn't appear to have be installed.

Thanks.