boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

030-comma.c (314B)


      1 /* tests/cc-e2e/30-comma.c — comma operator inside an initializer expression.
      2  * Split from 01-kitchen-sink. */
      3 
      4 int test_comma(void) {
      5     int a = 0; int b = 0;
      6     int x = (a = 5, b = 10, a + b); /* 15 */
      7     return x;
      8 }
      9 
     10 int main(int argc, char **argv) {
     11     if (test_comma() != 15) return 1;
     12     return 0;
     13 }