This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 4/6/07, John (Eljay) Love-Jensen <eljay@adobe.com> wrote:Hi Mohanlal,
That warning was introduced in GCC 3.4.
HTH, --Eljay
Hi Eljay,
With same compiler, following program works well (compiles as well as gives warning) #include <stdio.h>
class myClass { public: int count() __attribute__((warn_unused_result)); }; [...]
The only problem is, the program does not work if I define the method inside the class. Any clue ??
class myClass {
public:
int __attribute__((warn_unused_result)) count()
{
return printf("hello world\n");
}
};| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |