lkml.org 
[lkml]   [2020]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] speakup: only build serialio when ISA is enabled
Greg KH, le mar. 04 août 2020 17:49:52 +0200, a ecrit:
> > #define inb(c) ({ u8 __v; __io_pbr(); __v = readb_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
> >
> > and thus yes it's arithmetic over a (void*) pointer, the caller cannot
> > do anything about it.
>
> And that's fine, math with pointers, even void ones, is ok.

C++ doesn't like it, but in general compilers provide some semantic for
it, yes.

> I wonder why riscv was complaining about that. It's not nice, but it is
> valid C.

Strictly C speaking, no, but GNU C yes.

> Let's see if any of their developers care about it :)

Ok :) In the meanwhile I sent a v2 series that should fix the different
link cases, just not the particular riscv warning.

Samuel

\
 
 \ /
  Last update: 2020-08-04 18:12    [W:0.042 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site