Ian, Thanks for your reference link! I also went through gcc manual several days ago to learn the correct usage of __attribute__((deprecated)). While there are also cases where it is misused. That's the point I concerned here. For the first case in 2, following texts in your link might explain why the compiling failed: "An attribute specifier list may, in future, be permitted to appear after the declarator in a function definition (before any old-style parameter declarations or the function body)." I am looking forward to this change in the future. While for the case in 3, it's better for gcc to give a warning if it cannot take effect. Best Regards, Ly ---------------------------------------- > Date: Fri, 10 Aug 2012 13:16:00 -0700 > Subject: Re: Regarding compiling - __attribute__((deprecated)) > From: iant@xxxxxxxxxx > To: jwakely.gcc@xxxxxxxxx > CC: xmlymt@xxxxxxxxxxx; gcc-help@xxxxxxxxxxx > > On Fri, Aug 10, 2012 at 11:42 AM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > > On 10/08/2012, LiLy <xmlymt@xxxxxxxxxxx> wrote: > >> > >> Hi, > >> An attribute '__attribute__((deprecated))' can be used in a function > >> declaration to indicate the function is deprecated. > > > > This mail is off topic on this list, it would be appropriate on the > > gcc-help list. > > I know that typing that gets to be fairly instinctive, but I think in > this case the message was actually sent to gcc-help. > > LiLy: the syntax for where function attributes can be used can be > found at http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Attribute-Syntax.html > . If you find that unclear, please feel free to ask. > > Ian