Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated for _Alignof

...

The operand passed to_Alignof is never evaluated, despite not being an expression. For instance, if the operand is a VLA type, and the value of the VLA's size expression contains a side effect, that side effect is never evaluated.

The operand used in the controlling expression of a _genericGeneric selection expression is never evaluated.

...

Code Block
bgColor#FFcccc
langc
#include <stdio.h>
 
void func(void) {
  int val = 0; 
  /* ... */ 
  size_t align = _Alignof(int[++val]);
  printf("%z%zu, %d\n", align, val);
  /* ... */
}

...

Code Block
bgColor#ccccFF
langc
#include <stdio.h>
void func(void) {
  int val = 0; 
  /* ... */ 
  ++val;
  size_t align = _Alignof(int[val]);
  printf("%z%zu, %d\n, align, val);
  /* ... */
}

...