~ubuntu-branches/ubuntu/trusty/emscripten/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/core/test_funcptrfunc.in

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140119141240-jg1l42cc158j59tn
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
 
 
3
typedef void (*funcptr)(int, int);
 
4
typedef funcptr (*funcptrfunc)(int);
 
5
 
 
6
funcptr __attribute__((noinline)) getIt(int x) { return (funcptr)x; }
 
7
 
 
8
int main(int argc, char **argv) {
 
9
  funcptrfunc fpf = argc < 100 ? getIt : NULL;
 
10
  printf("*%p*\n", fpf(argc));
 
11
  return 0;
 
12
}