Mercurial > hg > CbC > old > device
view test/simp.c @ 751:c921670e2ce8
i64 continue... 64bit register
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 14 Nov 2010 04:56:02 +0900 |
parents | c2c709727221 |
children | c55337499f96 |
line wrap: on
line source
// #include "stdio.h" extern int printf(char *const,...); // #define UNDECL long long q = 122; void main5() { long long *p; int r[10]; double d; p = (long long *)&r; *p = q; d= (double)(*(long long*)&r); printf("#0019:%lld %g\n",*p,d); } float f = 3; float g = 4096.0f; int kk = {-3}; int main2(int i) { i+=f; return +i; } int alpha(c) char c; { return(('a'<=c&&c<='z')||('A'<=c&&c<='Z')||c=='_'); } char ch; void main1(); int main0() ; int main(int ac,char *av[]) { int i; printf("#0051:%d\n",ac); for(i=0;i<ac;i++) { printf("#0053:%s\n",&av[i][3]); } ch = 'E'; main1(-8); printf("#0057:%d\n",main2(3)); #ifdef UNDECL j = k; // undeclared global variable printf("#0060:%d\n",h); #endif main5(); return main0(ac,ch,av); } int main0(ac,ch,av) int ac; char ch; char *av[]; { int i; printf("#0073:%d %c\n",ac,ch); for(i=0;i<ac;i++) { printf("#0075:%s\n",&av[i][3]); } printf("#0077:%d==1\n",alpha(ch)); return 0; } void main1(int l) { printf("#0084:%d\n", ((l+0)<-511||(l+0)>511)); if ((l+0)<-511||(l+0)>511) printf("#0085:yes\n"); l = -1; printf("#0087:%d\n", l==-1? 555:333); }