Re: "const"-related gcc warnings with pointers around, annoying

2019-01-25 Thread Warren D Smith
On 1/25/19, Jonathan Wakely wrote: > On Fri, 25 Jan 2019 at 13:48, Warren D Smith wrote: >> >> "foo" is a type that is a struct containing a uint64_t field x[4] >> (among other things). >> >> bool Proc( const foo *dog ){ >>uint64_t *a, *b; >>a = dog->x; // pointer a now points to dog->

Re: "const"-related gcc warnings with pointers around, annoying

2019-01-25 Thread Jonathan Wakely
On Fri, 25 Jan 2019 at 13:48, Warren D Smith wrote: > > "foo" is a type that is a struct containing a uint64_t field x[4] > (among other things). > > bool Proc( const foo *dog ){ >uint64_t *a, *b; >a = dog->x; // pointer a now points to dog->x[0] >b = something else; >if( *a ==

"const"-related gcc warnings with pointers around, annoying

2019-01-25 Thread Warren D Smith
"foo" is a type that is a struct containing a uint64_t field x[4] (among other things). bool Proc( const foo *dog ){ uint64_t *a, *b; a = dog->x; // pointer a now points to dog->x[0] b = something else; if( *a == *b ) return(TRUE); return(FALSE); } Now gcc complains warning: ass