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

Re: [Xen-devel] [PATCH v6 1/4] xen: introduce SYMBOL



>>> On 14.01.19 at 18:24, <julien.grall@xxxxxxx> wrote:
> On 14/01/2019 16:44, Jan Beulich wrote:
>> 
>> extern struct my_struct __start[];
>> extern struct my_struct __end[];
>> 
>> void test(const struct my_struct *);
>> 
>> void foo(int i) {
>>      test(i ? __start : __end);
>> }
> 
> Your example doesn't contain any potential undefined behavior. So, how this 
> relevant with our discussion here?

I was merely trying to give an example where the compiler similarly
can't make implications. The potential undefined behavior would be
in test(), depending on what comparisons of the pointers it does.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.