~ubuntu-branches/ubuntu/vivid/emscripten/vivid-proposed

« back to all changes in this revision

Viewing changes to tests/core/test_ptrtoint.in

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (4.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140119141240-nfiw0p8033oitpfz
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
int main(int argc, const char *argv[]) {
 
4
  char *a = new char[10];
 
5
  char *a0 = a + 0;
 
6
  char *a5 = a + 5;
 
7
  int *b = new int[10];
 
8
  int *b0 = b + 0;
 
9
  int *b5 = b + 5;
 
10
  int c = (int)b5 - (int)b0;  // Emscripten should warn!
 
11
  int d = (int)b5 - (int)b0;  // Emscripten should warn!
 
12
  printf("*%d*\n", (int)a5 - (int)a0);
 
13
  return 0;
 
14
}