On Mon, 13 Aug 2007, Andy Dougherty wrote:

> On Sat, 11 Aug 2007, James E Keenan wrote:
> 
> > Bob Rogers wrote:
> > >    Compiling r20605 last night gave me 69291 occurrences of a warning
> > > about warn_unused_result:
> > > 
> > >   include/parrot/stacks.h:56: warning: `warn_unused_result' attribute 
> > > directive ignored

> > > All tests pass, so this is purely at the annoyance level.  I'm running
> > > gcc 3.3.1; is it because that is too old?

> > See http://rt.perl.org/rt3/Ticket/Display.html?id=44389.  I'm suffering the
> > same problem.  

> I'm not sure if it's relevant, but this attribute is available with
> gcc-3.3, but not with g++-3.3.  If you apply my patch at the end of RT
> #44379, you can at least be sure that Configure.pl has used the correct
> compiler and linker in the test.  It probably won't solve the problem,
> but may narrow it down some.

Ok, I've looked at this further: gcc-3.3 accepts the attribute and
exits with a 'success' exit status, but it then prints out the warning you
see above.  It would have been nice if gcc simply rejected the attribute
so that testing the exit status of gcc would be sufficient.  gcc-3.4
doesn't have this problem.  The test could either be made to only work
for gcc > 3.3, or it could try parsing the gcc-3.3 warning output (being
careful to handle localization issues appropriately, and avoiding false
positives for unrelated warnings).

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to