Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - c/kcc/bug25.log
There are no other files named bug25.log in the archive.
[PHOTO:  Recording initiated  Thu 14-Dec-89 12:15pm]

 End of PS:<KLH>COMAND.CMD.4
@ty bug25.c
main()
{
    /* M31003.C */
    /* short and int are different, even if same size */
    { short *p; int *q = 0; p = q; }    /* Should generate error */
    
    /* M31004.C */
    /* long and int are different, even if same size */
    { long  *a; int *b = 0; a = b; }    /* Should generate error */
    
    /* M31008.C */
    { /* enum constant must fit the (int) storage */    
    #include <limits.h>
    enum { A = INT_MAX, B };            /* Should generate error */
    }

    /* M31015.C */
    /* violates hexadecimal-constant syntax */
    { int i = 0x ; }

    /* M31019.C */
    /* value of hex escape sequence shall fit its storage */
    { int i = sizeof('\x1234567890123456789012345678901234567890'); }

    /* M31030.C */
    /* matching of {} punctuator is constraint */
    { { }

    /* M31032.C */
    { /* header-name syntax */
    #include <stdio.h
    }

}

@c2:nccx -S bug25
KCC:    bug25
"bug25.c", line 27: [Warning] Implicit conversion - pointer to pointer
       (main+5, p.1 l.27):  if same size */     { short *p; int *q = 0; p = q; 

"bug25.c", line 31: [Warning] Implicit conversion - pointer to pointer
       (main+9, p.1 l.31):  if same size */     { long  *a; int *b = 0; a = b; 

"bug25.c", line 42: [Note] Auto "i" not used
       (main+20, p.1 l.41): exadecimal-constant syntax */     { int i = 0x ; } 

"bug25.c", line 45: [Warning] Hex constant overflow
       (main+23, p.1 l.45): izeof('\x1234567890123456789012345678901234567890')

"bug25.c", line 46: [Note] Auto "i" not used
       (main+24, p.1 l.45): f('\x1234567890123456789012345678901234567890'); } 

@ty bug26.c

main()
{
    struct x { char a[4]; } f();
    int i;
    i = f().a[0];
}

@c2:nccx -S bug26
KCC:    bug26
"bug26.c", line 25: [Internal error] gaddress: bad op (node 8: 40=N_FNCALL)
       (main+7, p.1 l.25):  char a[4]; } f();     int i;     i = f().a[0]; } 

"bug26.c", line 25: [Internal error] vrtoreal: bad vr 0
       (main+7, p.1 l.25):  char a[4]; } f();     int i;     i = f().a[0]; } 

"bug26.c", line 25: [Warning][Internal error] vrstoreal: bad vr 0
       (main+7, p.1 l.25):  char a[4]; } f();     int i;     i = f().a[0]; } 

"bug26.c", line 25: [Internal error] vrfree: bad vr 0
       (main+7, p.1 l.25):  char a[4]; } f();     int i;     i = f().a[0]; } 

?KCC - 3 errors detected
@ty bug27.c

main ()
{  /* Should generate error */
   {  void f2int(int, int); f2int(1);  }
   
   /* Should generate error */
   { int i; void f2int(int, int); f2int(1,&i); }
   
   /* Should generate error -- not internal error */
   { int (*pf)(); pf++; }

   /* Should generate error -- not internal error */
   { int (*pf)(); ++pf; }

   /* Should generate error */   /* &bit-field is invalid */
   { static struct bitf {unsigned a : 1; } bitf = {0}; ff(&bitf.a); }

   /* Should generate error */ /* &register is invalid */
   { register int r1, r2, r3; ff(&r10); }

   /* Should generate error */ /* operand of sizeof isn't lvalue for bit-field *
/
   { static struct bitf {unsigned a:1;} bitf = {0}; ff(sizeof(bitf.a)); }
   
   /* Should generate error */ /* left operand of asst shall be modifiable lvalu
e */
   { typedef const struct ci { int i; } CI; CI a = {0}; a.i = 1; }
   
   
  /* Should generate error */ /* member of const aggregate is const and ass't */
  /* needs modifiable lvalue */
  { static const struct { int a; } cs = {9}; cs.a = 1; }

  /* Should generate error */  /* result type and const char isn't modifiable */
  { char c; char *p = &c; * (1 ? (char *)p : (const char *)p) = 0; }

  /* Should generate error */   /* Incompatible asst operands */
  { int i = 3; int *pi = &i; long int li = 4; long *pli = &li; pli = pi; }
}

@c2:nccx -S bug27
KCC:    bug27
"bug27.c", line 18: [Warning] Number of args doesn't match function prototype
       (main+2, p.1 l.18): erate error */    {  void f2int(int, int); f2int(1);

"bug27.c", line 21: [Warning] Implicit conversion - pointer to int
       (main+5, p.1 l.21): or */    { int i; void f2int(int, int); f2int(1,&i);

"bug27.c", line 30: [Note] Call to undeclared function "ff"
       (main+14, p.1 l.30): tic struct bitf {unsigned a : 1; } bitf = {0}; ff(&

"bug27.c", line 33: [Note] Call to undeclared function "ff"
       (main+17, p.1 l.33): er is invalid */    { register int r1, r2, r3; ff(&

"bug27.c", line 33: Undefined identifier: "r10"
       (main+17, p.1 l.33):  invalid */    { register int r1, r2, r3; ff(&r10);

"bug27.c", line 33: Operand of & must be lvalue
       (main+17, p.1 l.33):  invalid */    { register int r1, r2, r3; ff(&r10);

"bug27.c", line 34: [Note] Auto "r1" not used
       (main+18, p.1 l.33): valid */    { register int r1, r2, r3; ff(&r10); } 

"bug27.c", line 34: [Note] Auto "r2" not used
       (main+18, p.1 l.33): valid */    { register int r1, r2, r3; ff(&r10); } 

"bug27.c", line 34: [Note] Auto "r3" not used
       (main+18, p.1 l.33): valid */    { register int r1, r2, r3; ff(&r10); } 

"bug27.c", line 36: [Warning] Operand of sizeof has bitfield type
       (main+20, p.1 l.36): itf {unsigned a:1;} bitf = {0}; ff(sizeof(bitf.a));

"bug27.c", line 50: [Warning] Implicit conversion - pointer to pointer
       (main+34, p.1 l.50):  = &i; long int li = 4; long *pli = &li; pli = pi; 

?KCC - 2 errors detected
@ty bug28.c
#if 0
 5-Dec-89 14:52:37-PST,770;000000000005
Return-Path: <[email protected]>
Received: from saqqara.cis.ohio-state.edu by NIC.DDN.MIL with TCP; Tue, 5 Dec 89
 14:52:26 PST
Received: by saqqara.cis.ohio-state.edu (5.61/4.891204)
        id AA13464; Tue, 5 Dec 89 17:52:07 -0500
Date: 05 Dec 89 16:33:40 EST
From: <[email protected]>
To: <[email protected]>
Subject: EBUG34.C
Message-Id: <"CSI 5679-21773"@CompuServe.COM>

A Systems-wide gathering at Jill's house?  Okay by me.
#endif
/* EBUG34.C */

main()
{
    /* Should generate an error */ /* no comma in const expression */
    { static int d = (1,2); }

    /* Should generate an error */ /* each const expr shall fit its type */
    {
#include <limits.h>
    int i = 0;
    switch (i)
        {
        case LONG_MAX * 4 : i = 1;
        }    
    }

}

@c2:nccx -S bug28
KCC:    bug28
"bug28.c", line 20: [Note] Discarding expression without side effects
       (main+3, p.1 l.20): mma in const expression */     { static int d = (1,2

"bug28.c", line 21: [Note] Internal static "d" not used
       (main+4, p.1 l.20): n const expression */     { static int d = (1,2); } 

@pop

[PHOTO:  Recording terminated Thu 14-Dec-89 12:20pm]