1 // SPDX-License-Identifier: GPL-2.0-only
2 /// sizeof when applied to a pointer typed expression gives the size of
6 // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
7 // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
8 // URL: http://coccinelle.lip6.fr/
10 // Options: --no-includes --include-headers
30 f(...,(T)(x),...,sizeof(
40 f(...,(T)(x),...,i*sizeof(
60 *x = <+... sizeof@p(x) ...+>
62 *f(...,(T)(x),...,sizeof@p(x),...)
64 *f(...,sizeof@p(x),...,(T)(x),...)
66 *f(...,(T)(x),...,i*sizeof@p(x),...)
68 *f(...,i*sizeof@p(x),...,(T)(x),...)
71 @script:python depends on org@
75 cocci.print_main("application of sizeof to pointer",p)
77 @script:python depends on report@
81 msg = "ERROR: application of sizeof to pointer"
82 coccilib.report.print_report(p[0],msg)