From: Eric B. <er...@go...> - 2008-04-07 19:55:10
|
Berend de Boer wrote: > Hi All, > > Upgraded to the latest version last night and got this: > > # ./bootstrap.sh gcc ge > geant4.c: In function 'T55f41': > geant4.c:6703: warning: passing argument 1 of 'GE_check_void' discards qualifiers from pointer target type > geant4.c:6710: warning: passing argument 2 of 'T55f60' discards qualifiers from pointer target type > geant4.c:6714: warning: passing argument 2 of 'T17f17' discards qualifiers from pointer target type > geant4.c:6714: warning: passing argument 2 of 'T204f13' discards qualifiers from pointer target type > geant4.c:6719: warning: assignment discards qualifiers from pointer target type > geant4.c:6721: warning: assignment discards qualifiers from pointer target type > geant4.c:6743: warning: passing argument 2 of 'T76f1' discards qualifiers from pointer target type > geant4.c:6743: warning: passing argument 3 of 'T76f1' discards qualifiers from pointer target type > ... > > It builds the executables though (they are only warnings), but in case > someone is interested. I'm using gcc 4.1.1. The problem seems to be as follows. I have a local variable which needs to be declared as volatile (because of the use of setjmp/longjmp): volatile T0* l1 = 0; And then I call: f(l1); where `f' is declared as follows: void f(T0* a1); with no volatile qualifier. I think that this is what gcc is complaining about. Anyone knows how to make gcc happy? Should I declare my local variable as: T0 volatile *l1 = 0; instead of: volatile T0* l1 = 0; Or should I explicitly cast it as follows: f((T0*)l1); -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |