This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Deprecating arithmetic on std::atomic<void*>


On Thu, Apr 20, 2017 at 10:25:40AM +0100, Jonathan Wakely wrote:
> In theory maybe.
> 
> > I mean, with -pedantic-errors we already error on void * arighmetics
> > or function pointer arithmetics.  If std::atomic<void*> would use
> > the void * arithmetics, it would also reject it.  Or does it use integer
> > arithmetics instead?
> 
> No, it does it on void*, but the __atomic built-ins still perform that
> arithmetic even with -pedantic-errors.

Maybe that is what we should change, i.e. issue pedwarns similar to what we
emit on void * normal arithmetics for atomic/sync builtins that perform
arithmetics on void *, and error? for function pointer arithmetics.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]