VAX C Doesn't care about prototypes.
Brian Lambert
blambert at lotus.com
Sat Jul 21 04:47:48 AEST 1990
Hi:
I am using VAX C (latest version, 3.something) and I ran into this weird problemthe other day. As it turns out, the following code does not generate a
compilation warning:
typedef struct { long foo; } A;
typedef struct { short foo, bar; } B;
void x(B *b);
main()
{
A a;
B b;
x(&a); /* does not generate a warning */
x(&b);
...
This same code generated a compiler warning using -W1 in MSC 6.0. The manual
says that since the arguments are "assignment compatible" an automatic
conversion is provided. I don't want this - is there a way to disable this
less-than-useful functionality?
Thanks,
brian lambert
---
nothing interesting in here
More information about the Comp.lang.c
mailing list