TITLE: Typedefs are type aliases PROBLEM: pj@sam.wpd.sgi.com (Paul Jackson), 2 Oct 92 I have some routines that pass around a couple of small integer arguments, amongst other args. I want to type these args so that the compiler will warn if args of the wrong type are passed. How can I inhibit automatic promotion of other integer types, and get a warning or error instead. For example, what type (or other change) could I make (to) i1_t and i2_t in the following so that the compiler would not silently accept my passing a type i2_t to a function declared to expect a type i1_t: typedef int i1_t; typedef int i2_t; extern void foo(i1_t); main(){ foo(i2_t(1)); // wrong foo arg 1 type; but no warning return 0; } void foo(i1_t i){ foo(i); } RESPONSE: p j l @sparc10.cs.uiuc.edu (Paul Lucas), 3 Oct 92 AT&T Bell Laboratories *****> You can't. A typedef is *NOT* a new type: i1_t and 12_t are both int.