On 12/17/2010 02:34 AM, D. Michael McIntyre wrote:
> On Thursday, December 16, 2010, Dave Plater wrote:
>
>   
>> Fixed, fixed the blender gcc46 build failure as well.
>> I searched the files for an instance of stddef.h and couldn't find it
>> anywhere how does <= gcc45 pick it up?
>>     
> I have no idea, and I don't think anyone else really does either.  I think 
> what happens is somebody writes some code off the top of his head that uses 
> something like size_t, and it compiles, so nobody ever stops to think about 
> why or how.
>
> The way gcc handles all of this stuff is a mystery, and it changes from 
> version to version.  Every year or so, we get a note like yours about some 
> files that won't compile until we add some includes.  So we add them and go 
> on.
>
> I guess by the book we're probably missing tons of includes that should be 
> declared explicitly, but it's such a small problem in the scheme of things 
> that I think it's reasonable to carry on just addressing specific issues 
> whenever they happen to crop up.
>
> Thanks for bringing this to our attention.  If you'd be kind enough to 
> provide 
> a list of files that need this include added (or a patch), I'll go ahead and 
> commit the changes so we'll be all set when that version of gcc becomes more 
> popular.
>   
It was only the one failure, attaching patch (-p 0). I think that gcc
change warnings from previous versions into errors if they think it
warrants it. I googled a different error the other day, can't remember
the exact wording but it was caused by a return not being at the very
end of a function, looking through the function it looked like the
return I put in would never be used. Anyway I found my solution in a
forum which was discussing the gcc46 error as a warning, so obviously it
had changed from a warning to an error in gcc46. It's quite easy to
forget things like a return that almost never gets used until by fluke
the program crashes because it's not there, so maybe it's a good thing.
OTH I simply added "return 0;" before the last ending brace I wonder
what effect that will have if it ever gets used? The package I fixed in
this way will never get used, I just needed it to satisfy a dependency
for a factory test build and the normal factory was blocked but the
gcc46 factory wasn't.
Regards
Dave P
Index: src/sound/AudioCache.h
===================================================================
--- src/sound/AudioCache.h.orig	2010-01-05 16:41:33.000000000 +0200
+++ src/sound/AudioCache.h	2010-12-17 01:16:27.000000000 +0200
@@ -17,6 +17,7 @@
 #define _AUDIO_CACHE_H_
 
 #include <map>
+#include <stddef.h>
 
 namespace Rosegarden
 {
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to