Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 19.1 and assignment of one element of array
#1
Would the following examples be compliant with rule #19.1?
Code:
int16_t a[20];
void g(void)
{
    int16_t *p = &a[0];
    int16_t *q = &a[0];
    *p = *q;              /* Compliant - exception 1 */
}
void f(void)
{
    int16_t *p = &a[0];
    int16_t *q = &a[1];
    *p = *q;                     // here, is it Compliant ?
}
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)