Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Which lean C compiler for 32-bit OS development

Reply
Thread Tools

Which lean C compiler for 32-bit OS development

 
 
jacob navia
Guest
Posts: n/a
 
      11-14-2011
Le 13/11/11 05:43, ankh a écrit :
> "jacob navia"<(E-Mail Removed)> wrote in message
> news:j9lem0$jrq$(E-Mail Removed)...
>> Le 12/11/11 10:22, James Harris a écrit :
>>> In searching around I came across lcc and lcc-win. Remembering Jacob
>>> posts here make me think about asking on this newsgroup. I hope the
>>> query is just about close enough to being on topic! Any suggestions -
>>> even partial matches to the list above - would be appreciated.
>>>

>>
>> You will find mostly negative answers about my work in this group.
>>
>> Anyway my compiler system has been used extensively as a back end
>> For instance for the Eiffel language by the SmartEiffel compiler
>> by ML4 (a 4GL language) and as a JIT for an SQL--> C database
>> engine.
>>
>> I guess a JIT would be much better for your needs. I have one
>> for Windows, Linux, AIX, or Macintosh.
>>
>> jacob
>>

>
> The song remains the same, huh jake.
>
>


And you mean what by that sentence? What "song"? Who is "jake"?
 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      11-14-2011
On 11/15/11 09:57 AM, jacob navia wrote:
>
> And you mean what by that sentence? What "song"? Who is "jake"?


Your troll filter needs retuning.

--
Ian Collins
 
Reply With Quote
 
 
 
 
Nick Keighley
Guest
Posts: n/a
 
      11-15-2011
On Nov 14, 5:13*pm, Seebs <(E-Mail Removed)> wrote:
> On 2011-11-14, Nick Keighley <(E-Mail Removed)> wrote:
> > On Nov 12, 9:36?am, jacob navia <(E-Mail Removed)> wrote:


> >> You will find mostly negative answers about my work in this group.

>
> > only because you view any comment as some sort of criticism

>
> I had noticed a certain tendency towards that. *I actually rather
> like some of Jacob's ideas,


ditto. He has ideas that are worth discussing. If he were willing too.


> but after a while I plonked him because it was too
> frustrating trying to talk to him about them. *My options were
> simpering praise or being yelled at for my malicious and carefully
> planned campaign of slander. *Apparently, "being interested but
> having a suggestion for an improvement" is not one of the available
> states.


you can't even have a technical difference of opinion, or suggest
there may be some other option without it being construed as a
personnel attack. Apparently I'm a moron for not agreeing whole-
heartedly with him.

 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      11-15-2011
On Nov 14, 8:55*pm, jacob navia <(E-Mail Removed)> wrote:
> Le 13/11/11 04:13, Joe Wright a écrit :
>
> > On 11/12/2011 21:59, Nobody wrote:
> >> On Sat, 12 Nov 2011 01:22:45 -0800, James Harris wrote:

>
> >>> gcc is good on Unix but looks very complex to port and I think it needs
> >>> Cygwin on Windows.

>
> >> It doesn't. MinGW is the standard "native" Windows port of gcc. The
> >> standard 32-bit DOS port of gcc is DJGPP.

>
> > Indeed.

>
> "Indeed".
>
> You fail to mention that mingw has a C99 compiler but a C80
> Microsoft furnished library. This leads to some problems, as you may
> have noticed.


long double?

> lcc-win has essential parts of the C99 library like printf rewritten.
> I do not use tha Microsoft printf, so at least the compiler is
> coherent with the C library.


 
Reply With Quote
 
ImpalerCore
Guest
Posts: n/a
 
      11-15-2011
On Nov 14, 3:55*pm, jacob navia <(E-Mail Removed)> wrote:
> Le 13/11/11 04:13, Joe Wright a écrit :
>
> > On 11/12/2011 21:59, Nobody wrote:
> >> On Sat, 12 Nov 2011 01:22:45 -0800, James Harris wrote:

>
> >>> gcc is good on Unix but looks very complex to port and I think it needs
> >>> Cygwin on Windows.

>
> >> It doesn't. MinGW is the standard "native" Windows port of gcc. The
> >> standard 32-bit DOS port of gcc is DJGPP.

>
> > Indeed.

>
> "Indeed".
>
> You fail to mention that mingw has a C99 compiler but a C80
> Microsoft furnished library. This leads to some problems, as you may
> have noticed.
>
> lcc-win has essential parts of the C99 library like printf rewritten.
> I do not use tha Microsoft printf, so at least the compiler is
> coherent with the C library.


Actually, I recently just blew away my MinGW and reinstalled
everything. In the latest version of GCC (4.6.1), the C99 printf
modifiers appear to work. Not sure what they changed, but it appears
that some workaround has been integrated into the MinGW toolchain.

Best regards,
John D.
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      11-15-2011
ImpalerCore <(E-Mail Removed)> writes:
[...]
> Actually, I recently just blew away my MinGW and reinstalled
> everything. In the latest version of GCC (4.6.1), the C99 printf
> modifiers appear to work. Not sure what they changed, but it appears
> that some workaround has been integrated into the MinGW toolchain.


Interesting. I just did the same thing, and it still doesn't work
correctly.

Under Cygwin, this program:

#include <stdio.h>
int main(void) {
float f = 123.456;
double d = 123.456;
long double ld = 123.456;

printf("float: %d bytes, double: %d bytes, long double: %d bytes\n",
(int)sizeof (float),
(int)sizeof (double),
(int)sizeof (long double));
printf("f = %g\n", f);
printf("d = %g\n", d);
printf("ld = %Lg\n", ld);
return 0;
}

produces this (correct) output:

float: 4 bytes, double: 8 bytes, long double: 12 bytes
f = 123.456
d = 123.456
ld = 123.456

Under MinGW, installed from scratch on Windows 7 just a few minutes
ago,, with gcc 4.6.1, the same program produces this output:

float: 4 bytes, double: 8 bytes, long double: 12 bytes
f = 123.456
d = 123.456
ld = -6.41666e+264

Can you try this program on your system?

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      11-15-2011
Le 15/11/11 23:42, Keith Thompson a écrit :
>
> Under MinGW, installed from scratch on Windows 7 just a few minutes
> ago,, with gcc 4.6.1, the same program produces this output:
>
> float: 4 bytes, double: 8 bytes, long double: 12 bytes
> f = 123.456
> d = 123.456
> ld = -6.41666e+264
>
> Can you try this program on your system?
>


Try long long, it is bugged too.
That's why I rewrote printf from scratch.

And added all missing C99 functions lke the ones for setting
unsetting floating point precision, etc.

Years of work.

 
Reply With Quote
 
ImpalerCore
Guest
Posts: n/a
 
      11-16-2011
On Nov 15, 5:42*pm, Keith Thompson <(E-Mail Removed)> wrote:
> ImpalerCore <(E-Mail Removed)> writes:
>
> [...]
>
> > Actually, I recently just blew away my MinGW and reinstalled
> > everything. *In the latest version of GCC (4.6.1), the C99 printf
> > modifiers appear to work. *Not sure what they changed, but it appears
> > that some workaround has been integrated into the MinGW toolchain.

>
> Interesting. *I just did the same thing, and it still doesn't work
> correctly.
>
> Under Cygwin, this program:
>
> #include <stdio.h>
> int main(void) {
> * * float f * * * *= 123.456;
> * * double d * * * = 123.456;
> * * long double ld = 123.456;
>
> * * printf("float: %d bytes, double: %d bytes, long double: %d bytes\n",
> * * * * * *(int)sizeof (float),
> * * * * * *(int)sizeof (double),
> * * * * * *(int)sizeof (long double));
> * * printf("f *= %g\n", * f);
> * * printf("d *= %g\n", * d);
> * * printf("ld = %Lg\n", ld);
> * * return 0;
>
> }
>
> produces this (correct) output:
>
> float: 4 bytes, double: 8 bytes, long double: 12 bytes
> f *= 123.456
> d *= 123.456
> ld = 123.456
>
> Under MinGW, installed from scratch on Windows 7 just a few minutes
> ago,, with gcc 4.6.1, the same program produces this output:
>
> float: 4 bytes, double: 8 bytes, long double: 12 bytes
> f *= 123.456
> d *= 123.456
> ld = -6.41666e+264
>
> Can you try this program on your system?


I get the same result as you. It seems that their 'long double'
modifier is still broken. Still, I raised an eyebrow when %zu, %td,
%llu, and %lld started working.

\code
#include <stdio.h>
#include <limits.h>
#include <stdint.h>
#include <inttypes.h>

int main( void )
{
printf( "
------------------------------------------------------------------------
\n" );
printf( "| type | specifier | limit |
value |\n" );
printf( "
------------------------------------------------------------------------
\n" );

printf( " %-18s %-9s %-13s %" PRId8 "\n",
"int8_t", PRId8, "INT8_MIN", INT8_MIN );
printf( " %-18s %-9s %-13s %" PRId8 "\n",
"", "", "INT8_MAX", INT8_MAX );

printf( " %-18s %-9s %-13s %" PRId16 "\n",
"int16_t", PRId16, "INT16_MIN", INT16_MIN );
printf( " %-18s %-9s %-13s %" PRId16 "\n",
"", "", "INT16_MAX", INT16_MAX );

printf( " %-18s %-9s %-13s %" PRId32 "\n",
"int32_t", PRId32, "INT32_MIN", INT32_MIN );
printf( " %-18s %-9s %-13s %" PRId32 "\n",
"", "", "INT32_MAX", INT32_MAX );

#if defined(INT64_MIN)
printf( " %-18s %-9s %-13s %" PRId64 "\n",
"int64_t", PRId64, "INT64_MIN", INT64_MIN );
printf( " %-18s %-9s %-13s %" PRId64 "\n",
"", "", "INT64_MAX", INT64_MAX );
#endif

printf( " %-18s %-9s %-13s %" PRIu8 "\n",
"uint8_t", PRIu8, "UINT8_MAX", UINT8_MAX );
printf( " %-18s %-9s %-13s %" PRIu16 "\n",
"uint16_t", PRIu16, "UINT16_MAX", UINT16_MAX );
printf( " %-18s %-9s %-13s %" PRIu32 "\n",
"uint32_t", PRIu32, "UINT32_MAX", UINT32_MAX );
#if defined(UINT64_MAX)
printf( " %-18s %-9s %-13s %" PRIu64 "\n",
"uint64_t", PRIu64, "UINT64_MAX", UINT64_MAX );
#endif

printf( " %-18s %-9s %-13s %" PRIdMAX "\n",
"intmax_t", PRIdMAX, "INTMAX_MIN", INTMAX_MIN );
printf( " %-18s %-9s %-13s %" PRIdMAX "\n",
"", "", "INTMAX_MAX", INTMAX_MAX );
printf( " %-18s %-9s %-13s %" PRIuMAX "\n",
"uintmax_t", PRIuMAX, "UINTMAX_MAX", UINTMAX_MAX );

#if defined(LLONG_MAX)
printf( " %-18s %-9s %-13s %" "lld" "\n",
"long long", "lld", "LLONG_MIN", LLONG_MIN );
printf( " %-18s %-9s %-13s %" "lld" "\n",
"", "", "LLONG_MAX", LLONG_MAX );
printf( " %-18s %-9s %-13s %" "llu" "\n",
"unsigned long long", "llu", "ULLONG_MAX", ULLONG_MAX );
#endif

printf( " %-18s %-9s %-13s %zu\n",
"size_t", "zu", "SIZE_MAX", SIZE_MAX );
printf( " %-18s %-9s %-13s %td\n",
"ptrdiff_t", "td", "PTRDIFF_MIN", PTRDIFF_MIN );
printf( " %-18s %-9s %-13s %td\n",
"", "", "PTRDIFF_MAX", PTRDIFF_MAX );

return 0;
}
\endcode

Before, I would get incorrect results for zu, td, llu and lld. Now
they seem to be working.


------------------------------------------------------------------------
| type | specifier | limit |
value |

------------------------------------------------------------------------
int8_t d INT8_MIN -128
INT8_MAX 127
int16_t d INT16_MIN -32768
INT16_MAX 32767
int32_t d INT32_MIN -2147483648
INT32_MAX 2147483647
int64_t I64d INT64_MIN
-9223372036854775808
INT64_MAX 9223372036854775807
uint8_t u UINT8_MAX 255
uint16_t u UINT16_MAX 65535
uint32_t u UINT32_MAX 4294967295
uint64_t I64u UINT64_MAX
18446744073709551615
intmax_t I64d INTMAX_MIN
-9223372036854775808
INTMAX_MAX 9223372036854775807
uintmax_t I64u UINTMAX_MAX
18446744073709551615
long long lld LLONG_MIN
-9223372036854775808
LLONG_MAX 9223372036854775807
unsigned long long llu ULLONG_MAX
18446744073709551615
size_t zu SIZE_MAX 4294967295
ptrdiff_t td PTRDIFF_MIN -2147483648
PTRDIFF_MAX 2147483647

Best regards,
John D.
 
Reply With Quote
 
Jo
Guest
Posts: n/a
 
      11-20-2011
jacob navia wrote:
> Le 13/11/11 05:43, ankh a écrit :
>> "jacob navia"<(E-Mail Removed)> wrote in message
>> news:j9lem0$jrq$(E-Mail Removed)...
>>> Le 12/11/11 10:22, James Harris a écrit :
>>>> In searching around I came across lcc and lcc-win. Remembering
>>>> Jacob posts here make me think about asking on this newsgroup. I
>>>> hope the query is just about close enough to being on topic! Any
>>>> suggestions - even partial matches to the list above - would be
>>>> appreciated.
>>>
>>> You will find mostly negative answers about my work in this group.
>>>
>>> Anyway my compiler system has been used extensively as a back end
>>> For instance for the Eiffel language by the SmartEiffel compiler
>>> by ML4 (a 4GL language) and as a JIT for an SQL--> C database
>>> engine.
>>>
>>> I guess a JIT would be much better for your needs. I have one
>>> for Windows, Linux, AIX, or Macintosh.
>>>
>>> jacob
>>>

>>
>> The song remains the same, huh jake.
>>
>>

>
> And you mean what by that sentence? What "song"? Who is "jake"?


You are not good at what you want to do. You should change careers. You
are ineffectual and can't program yourself out of a paper bag (nor write
about it). Just a thought. Maybe some extrospection was in order, but you
can't seem to help yourself to save your own life or even leave a gleam
of it on this planet, so I thought I'd try to help you a bit.


 
Reply With Quote
 
BartC
Guest
Posts: n/a
 
      11-20-2011
"Jo" <(E-Mail Removed)> wrote in message
news:jaa1fn$2nj$(E-Mail Removed)...
> jacob navia wrote:


>> And you mean what by that sentence? What "song"? Who is "jake"?

>
> You are not good at what you want to do. You should change careers. You
> are ineffectual and can't program yourself out of a paper bag (nor write
> about it). Just a thought.


No. Someone writes some software with a million downloads, but of course
they are not good programmers! How many downloads do you have?

--
Bartc



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Optical disc makers lean towards HD DVD not Blu-ray. Allan DVD Video 1 08-17-2005 04:33 PM
Por favor antes de eliminar este mensaje, lean primero Uberto Computer Support 0 04-05-2005 08:49 PM
Why do they lean? Chuck Lorentzson Digital Photography 26 03-05-2005 04:06 PM
Trying to lean how to leave tables in the dust. Richard HTML 19 02-10-2005 07:59 PM
Question re David Lean movies release Mary DVD Video 1 09-13-2004 03:53 PM



Advertisments