OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900210_06.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do assemble  }
// { dg-do assemble  }
// g++ 1.36.1 bug 900210_06
// g++ 1.36.1 bug 900210_06
// g++ allows values of pointer-to-const types to be assigned to variables
// g++ allows values of pointer-to-const types to be assigned to variables
// of pointer-to-non-const types.
// of pointer-to-non-const types.
// Cfront 2.0 disallows such assignments.
// Cfront 2.0 disallows such assignments.
// g++ also allows values of pointer-to-volatile types to be assigned to
// g++ also allows values of pointer-to-volatile types to be assigned to
// variables of pointer-to-non-volatile types.
// variables of pointer-to-non-volatile types.
// Cfront 2.0 *would* disallow this (if it only supported "volatile").
// Cfront 2.0 *would* disallow this (if it only supported "volatile").
// keywords: pointer types, implicit type conversions
// keywords: pointer types, implicit type conversions
const char *ccp;
const char *ccp;
volatile char *vcp;
volatile char *vcp;
char *cp;
char *cp;
void function ()
void function ()
{
{
  cp = ccp;             /* { dg-error "" } */
  cp = ccp;             /* { dg-error "" } */
  cp = vcp;             /* { dg-error "" } */
  cp = vcp;             /* { dg-error "" } */
}
}
int main () { return 0; }
int main () { return 0; }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.