Query module AV Rule 96

name
AV Rule 96
description
Arrays shall not be treated polymorphically. Array indexing in C/C++ is implemented as pointer arithmetic. Hence, a[i] is equivalent to a+i*SIZEOF(array element). Since derived classes are often larger than base classes, polymorphism and pointer arithmetic are not compatible techniques.
kind
problem
id
cpp/jsf/av-rule-96
problem.severity
error
tags
correctness external/jsf

Imports

cpp

Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.

Predicates