Pelles C > Announcements

Version 6.50, Release Candidate #2 available

<< < (2/4) > >>

TimoVJL:
This version can compile SQLite 3.7.3 amalgamation version.
Good work Pelle !

lamer:
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: ---#ifndef __DUMMY_H__
#define __DUMMY_H__
int __cdecl dummyfunc(int);
#endif // DUMMY_H__
--- End code ---

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: ---int a = dummyfunc(1)
--- End code ---
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).

Pelle:
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?

MrBcx:

--- Quote from: Pelle 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?

--- End quote ---

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.   

TimoVJL:
BCX CR/LF

Error in speed optimization ?
Where is strlen code ?

--- Code: ---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

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version