Hi!

I get those warnings too. First I thought it was gcc 4.2's rather
messed up alias-analysis, but since Fred uses 4.4.1 that would not be
the case. Maybe -fno-strict-aliasing has to be added to the compiler
flags...

Cheers
TOM

Zitat von Fred Kiefer <fredkie...@gmx.de>:

After the reorganisation of base I get a lot more compiler warnings then
before. It would be great if somebody could look into these. I am using
gcc 4.4.1 on a 64 bit system.

Compiling file GSObjCRuntime.m ...
                                    GSObjCRuntime.m: In function
‘GSObjCMethodNames’:

GSObjCRuntime.m:154: warning: dereferencing type-punned pointer will
break strict-aliasing rules
GSObjCRuntime.m:154: warning: dereferencing type-punned pointer will
break strict-aliasing rules
In file included from GSObjCRuntime.m:1212:

../../Headers/Additions/GNUstepBase/GSIMap.h: In function
‘GSIMapCountByEnumeratingWithStateObjectsCount’:
../../Headers/Additions/GNUstepBase/GSIMap.h:981: warning: dereferencing
type-punned pointer will break strict-aliasing rules
GSObjCRuntime.m: In function ‘GSObjCMethodNames’:

GSObjCRuntime.m:154: warning: dereferencing pointer ‘iterator.78’ does
break strict-aliasing rules
GSObjCRuntime.m:154: note: initialized from here

Compiling file NSInvocation+GNUstepBase.m ...

NSInvocation+GNUstepBase.m:32:2: warning: #warning (steph...@sente.ch)
Not implemented
NSInvocation+GNUstepBase.m:38:2: warning: #warning (steph...@sente.ch)
Not implemented

Shouldn't we just remove these methods? Extensions that aren't
implemented don't look to useful.

Compiling file NSArray.m ...

NSArray.m: In function ‘-[NSArray
countByEnumeratingWithState:objects:count:]’:
NSArray.m:397: warning: cast to pointer from integer of different size


If David's book is correct, than this is the wrong way to deal with the
mutations pointer. David could you please have a look?

Compiling file NSConcreteHashTable.m ...

NSConcreteHashTable.m: In function ‘-[NSConcreteHashTable
countByEnumeratingWithState:objects:count:]’:
../Headers/Additions/GNUstepBase/GSIMap.h:926: warning: dereferencing
pointer ‘enumerator.71’ does break strict-aliasing rules

../Headers/Additions/GNUstepBase/GSIMap.h:926: note: initialized from
here
../Headers/Additions/GNUstepBase/GSIMap.h:928: warning: dereferencing
pointer ‘enumerator.71’ does break strict-aliasing rules

../Headers/Additions/GNUstepBase/GSIMap.h:928: note: initialized from
here
NSConcreteHashTable.m: In function ‘NSCompareHashTables’:

../Headers/Additions/GNUstepBase/GSIMap.h:926: warning: dereferencing
pointer ‘enumerator.71’ does break strict-aliasing rules

../Headers/Additions/GNUstepBase/GSIMap.h:926: note: initialized from
here
../Headers/Additions/GNUstepBase/GSIMap.h:928: warning: dereferencing
pointer ‘enumerator.71’ does break strict-aliasing rules

../Headers/Additions/GNUstepBase/GSIMap.h:928: note: initialized from
here
../Headers/Additions/GNUstepBase/GSIMap.h:926: warning: dereferencing
pointer ‘enumerator.71’ does break strict-aliasing rules

../Headers/Additions/GNUstepBase/GSIMap.h:926: note: initialized from
here
../Headers/Additions/GNUstepBase/GSIMap.h:928: warning: dereferencing
pointer ‘enumerator.71’ does break strict-aliasing rules

../Headers/Additions/GNUstepBase/GSIMap.h:928: note: initialized from
here

There are plenty more of these...

Compiling file NSDistantObject.m ...

NSDistantObject.m: In function ‘-[NSDistantObject
methodSignatureForSelector:]’:
NSDistantObject.m:728: warning: call to function
‘GSDescriptionForInstanceMethod’ without a real prototype
NSDistantObject.m:727: note: ‘GSDescriptionForInstanceMethod’ was
declared here
NSDistantObject.m:740: warning: call to function
‘GSDescriptionForClassMethod’ without a real prototype
NSDistantObject.m:739: note: ‘GSDescriptionForClassMethod’ was declared
here

This is an old one.

Compiling file NSException.m ...

NSException.m: In function ‘-[GSStackTrace init]’:

NSException.m:596: warning: cast from pointer to integer of different
size
NSException.m: In function ‘-[GSStackTrace symbols]’:

NSException.m:621: warning: cast to pointer from integer of different size

Another old one.

Compiling file NSHashTable.m ...

NSHashTable.m: In function ‘-[NSHashTable count]’:

NSHashTable.m:145: warning: cast from pointer to integer of different
size
NSHashTable.m: In function ‘-[NSHashTable
countByEnumeratingWithState:objects:count:]’:
NSHashTable.m:152: warning: cast from pointer to integer of different
size

And once more an old one.
Compiling file NSMapTable.m ...

NSMapTable.m: In function ‘-[NSMapTable count]’:

NSMapTable.m:140: warning: cast from pointer to integer of different
size
NSMapTable.m: In function ‘-[NSMapTable
countByEnumeratingWithState:objects:count:]’:
NSMapTable.m:147: warning: cast from pointer to integer of different
size

Compiling file NSNumber.m ...

NSNumber.m: In function ‘-[NSNumber pointerValue]’:

NSNumber.m:567: warning: cast to pointer from integer of different size


Compiling file NSPortCoder.m ...

NSPortCoder.m: In function ‘-[NSPortCoder decodeValueOfObjCType:at:]’:

../Headers/Foundation/NSByteOrder.h:192: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:191: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:190: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:189: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:188: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:187: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:186: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:185: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:184: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:183: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:182: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:181: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:180: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:179: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:178: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:177: warning: dereferencing pointer
‘src’ does break strict-aliasing rules

../Headers/Foundation/NSByteOrder.h:173: note: initialized from here

NSPortCoder.m:1038: warning: dereferencing pointer ‘val.212’ does break
strict-aliasing rules
NSPortCoder.m:1038: note: initialized from here

I'll stop here as you are surely able to reproduce most of these
warnings on your own machine. I don't think that we need to remove all
compiler warnings (That would mean to treat them as errors, as Etoile
does). But some seem to places where our new implementation may not be
stable enough on all platforms.


_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev






_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to