From: padam c. <pad...@ya...> - 2009-09-30 10:20:36
|
Hi Greg thanks for your suggestions, i tried to compile it on Comeau and got this message: Your Comeau C/C++ test results are as follows: Comeau C/C++ 4.3.9 (Mar 27 2007 17:24:47) for ONLINE_EVALUATION_BETA2 Copyright 1988-2007 Comeau Computing. All rights reserved. MODE:non-strict warnings C99 noC++0x_extensions "ComeauTest.c", line 6: warning: typedef name has already been declared (with same type) }MyStruct; ^ -Padam In non-strict mode, with -tused, Compile succeeded (but remember, the Comeau online compiler does not link). Compiled with C++0x extensions DISabled. --- On Wed, 30/9/09, Greg Chicares <gch...@sb...> wrote: From: Greg Chicares <gch...@sb...> Subject: Re: [Mingw-users] Error: redefinition of typedef To: "MinGW Users List" <min...@li...> Date: Wednesday, 30 September, 2009, 3:35 PM On 2009-09-30 05:29Z, padam chamoli wrote: > > I am getting this error: > test.c:6: error: redefinition of typedef 'MyStruct' > test.c:3: error: previous declaration of 'MyStruct' was here You can't redefine a typedef in standard C. See, for example: http://groups.google.com/group/comp.lang.c.moderated/browse_thread/thread/bfe0c8d9d631afd9/b786d09be50faa17 http://groups.google.com/group/comp.lang.c.moderated/browse_thread/thread/73d1249c78f99dd3/a409a5a5c0be0d84 > I am able to succesfully compile the same using Win32 and RVCT22 compilers. If you want a reputable second opinion, paste your code here: http://www.comeaucomputing.com/tryitout Some compilers may allow typedef redefinition as an extension. But code that relies on such an extension is not portable. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ MinGW-users mailing list Min...@li... This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists. We ask that you be polite and do the same. Most annoying abuses are: 1) Top posting 2) Thread hijacking 3) HTML/MIME encoded mail 4) Improper quoting 5) Improper trimming _______________________________________________ You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users Connect more, do more and share more with Yahoo! India Mail. Learn more. http://in.overview.mail.yahoo.com/ |