[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compiler warnings with the new base code
From: |
Fred Kiefer |
Subject: |
Compiler warnings with the new base code |
Date: |
Mon, 15 Feb 2010 14:47:19 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0 |
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 (address@hidden)
Not implemented
NSInvocation+GNUstepBase.m:38:2: warning: #warning (address@hidden)
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.
- Compiler warnings with the new base code,
Fred Kiefer <=
- Re: Compiler warnings with the new base code, Richard Frith-Macdonald, 2010/02/15
- Re: Compiler warnings with the new base code, Fred Kiefer, 2010/02/18
- Re: Compiler warnings with the new base code, Fred Kiefer, 2010/02/18
- Re: Compiler warnings with the new base code, David Chisnall, 2010/02/18
- Re: Compiler warnings with the new base code, Richard Frith-Macdonald, 2010/02/18
- Re: Compiler warnings with the new base code, David Chisnall, 2010/02/18
- Re: Compiler warnings with the new base code, Richard Frith-Macdonald, 2010/02/18
- Re: Compiler warnings with the new base code, David Chisnall, 2010/02/18