[lkml]   [2018]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: test case against union aliasing

On Tue, 27 Feb 2018, Andy Shevchenko wrote:

> Hi!
> It seems we have some code in kernel which utilizes (rightlessly for
> now) union aliasing.
> So, can we create a test case against such? (Three steps: a) replace
> union by struct keyword in data type in question, b) compile, c) run in
> Qemu with proper functional test)
> Does it make any sense?

I think so. If you want to do it more safely than with sed, it should be
possible with Coccinelle, with just

identifier i;

-union i
+struct i


 \ /
  Last update: 2018-02-27 14:31    [W:0.049 / U:5.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site