summaryrefslogtreecommitdiff
path: root/test/regression/annot1.c
blob: 85ba9f72479b59227037e868816fec06e347ca44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>

/* Annotations */

int f(int x)
{
  return __builtin_annot_intval("f(%1)", x + 1);
}

double g(double x, double y)
{
  __builtin_annot("g(%1, %2)", x, y);
  return x + y;
}

int main()
{
  __builtin_annot("calling f");
  printf("f returns %d\n", f(12));
  __builtin_annot("calling g");
  printf("g returns %.2f\n", g(3.14, 2.718));
  return 0;
}