Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!njin!princeton!udel!wuarchive!zaphod.mps.ohio-state.edu!uakari!ames!pacbell!att!cbnewsh!em From: em@cbnewsh.ATT.COM (edward.man) Newsgroups: comp.lang.c Subject: typedef vs #define Keywords: difference Message-ID: <8430@cbnewsh.ATT.COM> Date: 23 Feb 90 17:58:52 GMT Distribution: usa Organization: AT&T Bell Laboratories Lines: 20 Is there any compiler writer out there? I have a C question that's best answered by C compiler writers. Of course other C experts can also provide insights and comments. However, I am looking for a sure answer. The question is: Consider the following two C statements: typedef short FLAGS #define FLAGS short If I had two identical pieces of code, one used the "typedef" and ther other "#define" as defined above, would there be any difference in the compiled code? Does the C compiler handle the two differently? I know "#define" is handled by cpp and the compiler never sees FLAGS. How is "typedef" handled, by cpp or the compiler? Ed Man AT&T Bell Laboratories att!hotlf!man