Re: [RFC][PATCH] rcu: Use typeof(p) instead of typeof(*p) *

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 5 Oct 2021 09:18:04 -0700
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Tue, Oct 5, 2021 at 6:47 AM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> >
> > Also had to update a lot of the function pointer initialization in the
> > networking code, as a function address must be passed as an argument in
> > RCU_INIT_POINTER() and not just the function name, otherwise the following
> > error occurs:  
> 
> Ugh.
> 
> I think this is a sign of why we did it the way we did with that odd
> "typeof(*p)*" thing in the first place.
> 

Oh, which was also compiler specific.

On my fedora box, which has:

  gcc version 10.3.1 20210422 (Red Hat 10.3.1-1) (GCC)

It compiled fine, with no errors.

But on my Debian box with:

  gcc version 10.2.1 20210110 (Debian 10.2.1-6)

The function pointers were an issue :-/


-- Steve



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux