Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Tue, 4 Sep 2001 18:00:41 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Cc: danny_r_smith_2001 AT yahoo DOT co DOT nz Subject: Re: Problems executing programs which includes rpcndr.h Message-ID: <20010904180041.C10904@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com, danny_r_smith_2001 AT yahoo DOT co DOT nz References: <20010904212619 DOT 8227 DOT qmail AT web14510 DOT mail DOT yahoo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010904212619.8227.qmail@web14510.mail.yahoo.com> User-Agent: Mutt/1.3.21i Are you going to submit this to gcc-patches, Danny? cgf On Wed, Sep 05, 2001 at 07:26:19AM +1000, Danny Smith wrote: >This is an old problem with C++ parsing of function attribute that is >fixed in gcc-2.95.3. However the fix has not been incorportaed in >3.0.x branch. Here is Bob Wilson's patch that has been applied to >2.95.3 (at least in the cygwin and mingw instantiations): > >http://gcc.gnu.org/ml/gcc-patches/2001-01/msg01751.html > >Have a look at the assembly for the first example you sent. _malloc AT 4 >looks a bit strange, doesn't it. That is why, in the past, windows.h >had to be included before > >gcc/cp/decl.c has undergone some serious reorganisation. Following is >the above patch refreshed for gcc-3.0.1. > > >--- decl.c-3.0.1 Tue Sep 04 19:29:10 2001 >+++ decl.c Tue Sep 04 19:38:45 2001 >@@ -10469,7 +10469,16 @@ grokdeclarator (declarator, declspecs, d > ignore_attrs = 0; > else if (inner_attrs) > { >- decl_attributes (type, inner_attrs, NULL_TREE); >+ /* Create a dummy decl to pass to decl_attributes. The >+ attributes will be added to a variant of type, and this >+ new variant type can be retrieved from the dummy decl. >+ Passing type directly causes the attributes to be added >+ to type, which is wrong because type may be used >+ elsewhere without attributes. */ >+ >+ tree dummy = build_decl (TYPE_DECL, NULL_TREE, type); >+ decl_attributes (dummy, inner_attrs, NULL_TREE); >+ type = TREE_TYPE (dummy); > inner_attrs = NULL_TREE; > } > >@@ -10988,7 +10997,18 @@ grokdeclarator (declarator, declspecs, d > if (inner_attrs) > { > if (! ignore_attrs) >- decl_attributes (type, inner_attrs, NULL_TREE); >+ { >+ /* Create a dummy decl to pass to decl_attributes. The >+ attributes will be added to a variant of type, and this >+ new variant type can be retrieved from the dummy decl. >+ Passing type directly causes the attributes to be added >+ to type, which is wrong because type may be used >+ elsewhere without attributes. */ >+ >+ tree dummy = build_decl (TYPE_DECL, NULL_TREE, type); >+ decl_attributes (dummy, inner_attrs, NULL_TREE); >+ type = TREE_TYPE (dummy); >+ } > else if (attrlist) > TREE_VALUE (attrlist) = chainon (inner_attrs, TREE_VALUE (attrlist)); > else > > >Danny > > > >Re: Problems executing programs which includes rpcndr.h >To: cygwin at cygwin dot com >Subject: Re: Problems executing programs which includes rpcndr.h >From: David Salotti >Date: Tue, 4 Sep 2001 16:28:00 +1000 >Organization: Proximity >References: <20010903185145 DOT 0dc8de2f DOT david AT proximity DOT com DOT au> > >-------------------------------------------------------------------------------- > >Ok, this is pretty weird - but if I rearrange the #include's, I am able >to run >the program successfully??? Does anyone know what's in rpcndr.h that's >conflicting with iostream?? > >the arrangement that works is: > > #include > #include > #include > >ta >Dave > > > > > >_____________________________________________________________________________ >http://messenger.yahoo.com.au - Yahoo! Messenger >- Voice chat, mail alerts, stock quotes and favourite news and lots more! > >-- >Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple >Bug reporting: http://cygwin.com/bugs.html >Documentation: http://cygwin.com/docs.html >FAQ: http://cygwin.com/faq/ -- cgf AT cygnus DOT com Red Hat, Inc. http://sources.redhat.com/ http://www.redhat.com/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/