United States |
Previous | Contents |
This kit contains the following bug fixes beyond those contained in DEC C V5.0-003:
unsigned int w = 17; g(*(struct B *)&w); |
j(int a) { p(sizeof(j())); } |
main() { extern void init_color(); } Raise_Maps() { init_color(); } Title_Page() { extern void init_color(); } |
/* This program used to ACCVIO on VAX/VMS, now it gets a compile-time diagnostic */ struct { int i; char longer_than_1020[1021]; } public_domain_sloppy_programmer; void nothing(); main () { nothing (public_domain_sloppy_programmer); } |
void fred (void) { typedef int A[2][3]; const A a = {{4, 5, 6}, {7, 8, 9}}; a[0][0] = 42; } |
#define concat(a,b) a ## b return concat(0x0,1AL) ; |
#define str1(arg) "arg" #define str2(arg) "arg-ber" #define str3(arg) "go to the arg" |
void f (char); void f (p1) char p1; {} $ cc/stand=vaxc foo.c $ cc foo.c char p1; .....^ %CC-W-PROMOTMATCHW, In the definition of the function "f", the promoted type of p1 is incompatible with the type of the corresponding parameter in a prior declaration. at line number 3 in file DISK:[dir]FOO.C;1 |
extern in (*f1())(int (*f2)()); int (*f1(f2))() int (*f2)(); { return 0;} |
#define A(x) -x main() { int i = 1; printf("%d\n", -A(i)); } |
printf("%d\n", --i); |
/* comment *\ / |
__inline void func1(void} {} void func2 (void) {} #pragma inline func2 |
typedef int (F)(); const volatile F abs; |
register int x; int *p = &x; |
extern int x; #include <stdio.h> int main(void) { printf("Hello world\n"); } |
int x(int first, ...); int x(); |
static void f(char *argv[]) {} static void g(const char *argv[]) { f(argv); %CC-W-PTRMISMATCH, (1) In this statement, the referenced type of the pointer value "argv" is "pointer to const char", which is not compatible with "pointer to char". } |
This is a list of some known compiler restrictions and bugs.
h1 += (h4 ^ (h2 & (h3 ^ h4))) + input[0] + 0xd76aa478; h1 = h1 << 7 | h1 >> 25; h1 += h2; |
#include <stdio.h> #pragma builtins int main(void) { char name[]= "node:: ", *p_c; char **pp_c = &p_c; _LOCC ( ':', sizeof(name), &name, &p_c ); *p_c++ = '-'; _LOCC ( '+', sizeof(name), &name, pp_c ); *p_c++ = '+'; printf(name); } |
void f() { if (0) {} while (1) if (0); } |
long *************************************************** *************************************************** *************************************************** *************************************************** *************************************************** *********************************************a; |
#include <stdio.h> static int called(int); /* Adding #pragma noinline called makes this work */ int main (void) { volatile int zz = 1; printf("Hello World!\n"); printf("Answer is: %d should be (12)\n",caller(zz)); } int caller( int sw) { switch(sw) { case 0: return called(3); break; case 1: return called(3); break; } } int called(int k) { struct {int table[4000];} *p=0; return (int)&(p->table[k]); } |
main(){ double db = 34.439; /* can't be examined */ static double sb = 45.54; /* can be examined */ } |
extern sub1(); extern sub2(); extern sub3(); main() { int i, j, k; for (i=0; i<1; i++) for (j=0; j<1; j++) { goto label2; label1: sub4(); sub5(); sub6(); } return; label2: for (k=0; k<1; k++) { sub1(); sub2(); sub3(); } goto label1; } |
/* relaxed_refdef --> tentative definition */ int global_var; |
/* strict_refdef --> definition */ int global_var; |
Previous | Next | Contents |
|