Topic: Poison for BCC++ 3.00 (error).
Author: k2v@s514.ipmce.su (Vladimir V. Karavayev)
Date: 25 Feb 92 05:24:36 GMT Raw View
To kill compiler, take .cpp file, having
"poison" function and compile bu Borland c++ Version 3.00 (bc or bcc).
void poison(void)
{
int far *a=(void _seg *)1+0;
}
You will be have fatal error.
I would like to get a mails about another errors of bc++ 3.00.
Please email : k2v@s514.ipmce.su
Vladimir V. Karavayev.
P.S. Thanks in advance for any and all help.
Author: johnm@cory.Berkeley.EDU (John D. Mitchell)
Date: Wed, 26 Feb 1992 01:28:03 GMT Raw View
In article <ACKCTgfiZ3@s514.ipmce.su> k2v@s514.ipmce.su writes:
>
> To kill compiler, take .cpp file, having
> "poison" function and compile bu Borland c++ Version 3.00 (bc or bcc).
>
>void poison(void)
> {
> int far *a=(void _seg *)1+0;
> }
I am under the impression that your code is not valid because it is illegal
to do addition on void pointers (well in Standard C anyways). It certainly
is not a nice thing for BC to just die on you though. I would think that a
nice little warning would be much more useful. :-)
John
johnm@cory.Berkeley.EDU