This GNU extension caused a bug where a void pointer was modified then
interpreted as uint32_t* (instead of the other way round). Force a
compile error to (hopefully) prevent this from happening again.
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25327>
inc_src,
inc_imagination,
],
- c_args : [no_override_init_args],
+ c_args : [imagination_c_args, no_override_init_args],
gnu_symbol_visibility : 'hidden',
)
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+imagination_c_args = cc.get_supported_arguments(
+ '-Werror=pointer-arith',
+)
+
inc_imagination = include_directories([
'.',
'common',
inc_include,
inc_src,
],
- c_args : [no_override_init_args],
+ c_args : [imagination_c_args, no_override_init_args],
gnu_symbol_visibility : 'hidden',
dependencies : [idep_mesautil, idep_nir, idep_vulkan_runtime, dep_csbgen],
install : true,
inc_src,
inc_rogue,
],
+ c_args : [imagination_c_args],
build_by_default : with_imagination_tools,
install : false,
)
]
pvr_flags = [
+ imagination_c_args,
no_override_init_args,
]
inc_imagination,
],
c_args : [
+ imagination_c_args,
no_override_init_args,
],
gnu_symbol_visibility : 'hidden',