aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/send_through/send_through_gcc.c
blob: 83541ceec1614424f12900176562964bf129805f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include "send_through.h"

double sum_int_double(int x, double y) {
  return x + y;
}

float sum_int_float(int x, float y) {
  return x + y;
}

int main() {
  double x = send_through_double(sum_int_double, 2, 3, 4.5);
  float y = send_through_float(sum_int_float, 2, 3, 4.5f);
  printf("x[gcc] = %f\n", x);
  printf("y[gcc] = %f\n", y);
  print_from_ccomp(x);
}