dhoke
2008-06-16 15:56:46 UTC
If this still happens with bds2007 bcc32, somebody might wish to report it.
(I haven't bothered to put it in a project to see if there's different
behaviour with IDE compilation.)
The following program source when compiled as simply
bcc32 bcchang_b.cpp
-or-
bcc32 bcchang_b.c
(appropriately) reports errors, then continues to consume CPU beyond my
level of patience to wait for it to stop. (I gave it > 2 minutes.) (With
errors corrected in original context, entire program compiles and links in <
5 seconds for me [after OS has tools in filesystem cache].)
The first error message is slightly different between .c and .cpp versions,
but both runaway with CPU after error messages reported.
========================
#include <stdio.h>
void dump(char *p_p, int n)
{
// int i, j, n_copy = n, n2 ;
int i, n_copy = n ;
char *p = p_p ;
// n2 = 0 ;
for( ; n_copy ; )
{
for(i=0 ; n _copy i < 8 ; i++)
// for(i=0 ; n_copy && i < 8 ; i++)
{
printf("%02x ", *p++) ;
n_copy-- ;
}
printf(" ") ;
for(i=0 ; n_copy && i < 8 ; i++)
{
printf("%02x ", *p+++) ;
// printf("%02x ", *p++) ;
n_copy-- ;
}
printf("\n") ;
}
}
========================
(I haven't bothered to put it in a project to see if there's different
behaviour with IDE compilation.)
The following program source when compiled as simply
bcc32 bcchang_b.cpp
-or-
bcc32 bcchang_b.c
(appropriately) reports errors, then continues to consume CPU beyond my
level of patience to wait for it to stop. (I gave it > 2 minutes.) (With
errors corrected in original context, entire program compiles and links in <
5 seconds for me [after OS has tools in filesystem cache].)
The first error message is slightly different between .c and .cpp versions,
but both runaway with CPU after error messages reported.
========================
#include <stdio.h>
void dump(char *p_p, int n)
{
// int i, j, n_copy = n, n2 ;
int i, n_copy = n ;
char *p = p_p ;
// n2 = 0 ;
for( ; n_copy ; )
{
for(i=0 ; n _copy i < 8 ; i++)
// for(i=0 ; n_copy && i < 8 ; i++)
{
printf("%02x ", *p++) ;
n_copy-- ;
}
printf(" ") ;
for(i=0 ; n_copy && i < 8 ; i++)
{
printf("%02x ", *p+++) ;
// printf("%02x ", *p++) ;
n_copy-- ;
}
printf("\n") ;
}
}
========================