Description:
The lcc C Compiler and related topics.
|
|
|
jacob: lcc64 compiler -1 vs DWORD_PTR compare problem
|
| |
compiled with lcc64
int main()
{
int r = -1;
DWORD_PTR zero = 0;
if (r > zero) printf("r > 0\n");
...
it will print 'r>0'
i'm not sure is this compiler bug or not, but it makes a lot of problems with win32--->win64 code migration.
-1 is used in SOCKET_ERROR and INVALID_HANDLE_VALUE... more »
|
|
nonterminals
|
| |
I've written a compiler backend for lcc. I've done alot of micro tests, which worked fine, but on my first bigger programm i get the error:
error in _rule-- Bad goal nonterminal xxxxxx
where the xxxxxx varies each time i try to compile.
Is their any way to find out which nonterminal is missing in my backend?... more »
|
|
DLL interoperability issues
|
| |
Hi. I have used lcc-win32 for quite a while to write native interfaces for my Java applications. At present I am implementing an interface to libusb-win32 (USB driver) that should work on both 32 bit and 64 bit systems. Despite it's name this project provides both 32 bit and 64 bit DLLs. Unfortunately the 64 bit version gives me some trouble. It appears that char arrays are packed differently in memory in the lcc generated DLL vs. the DLL from libusb-win32.... more »
|
|
Jacob: possible lcc64 CreateThread / WINAPI compiler bug
|
| |
All code is compiled with -dll option (RIP-related addressing) with
latest version of lcc64
//This will crash:
//---------------------
...
DWORD WINAPI thread(DWORD *p);
int main()
{
DWORD tid;
CloseHandle(CreateThread(NULL, 0,thread,NULL,0,&tid));
loop:; Sleep(0); goto loop;
...... more »
|
|
b5ms.zip: the documentation for getsockname.namelen is misleading
|
| |
Is: namelen [out] The size of the name buffer.
Should be: namelen [inout] The size of the name buffer.
The problem occurs when namelen points to an automatic variable without a value and the code is compiled in debug mode; WSAGetLastError() == 0x271e (invalid pointer).
|
|
LOBYTE (0400): Overflow in constat expression
|
| |
1. What is "constat expression"?
2. The warning is bogus and quite disconcerting; you cannot tell actual issues from fake ones.
I can live with the fact that ((BYTE) (0400)) produces a warning because it is a cast and a narrowing cast is a bad thing; however, (LOBYTE (0400)) should not.
It works if I use (0400 & UCHAR_MAX) instead but LOBYTE is a Microsoft macro... more »
|
|
2.25: Finding more examples and source code
|
| |
The web site [link] contains many examples that lcc-win users can easily compile and learn from.
Except that it does not.
Sorry, this page is no longer available
We are sorry, but the BT Web Hosting service that supports these pages is no longer supported.... more »
|
|
What is Connect?
|
| |
The documentation for ClientConnect contains the following call:
Connect(&session)
Warning c:\lcc\projects\test.c: 11 missing prototype for Connect
|
|
|