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] - Blame information for rev 305

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// g++ 1.36.1 bug 900210_06
3
 
4
// g++ allows values of pointer-to-const types to be assigned to variables
5
// of pointer-to-non-const types.
6
 
7
// Cfront 2.0 disallows such assignments.
8
 
9
// g++ also allows values of pointer-to-volatile types to be assigned to
10
// variables of pointer-to-non-volatile types.
11
 
12
// Cfront 2.0 *would* disallow this (if it only supported "volatile").
13
 
14
// keywords: pointer types, implicit type conversions
15
 
16
const char *ccp;
17
volatile char *vcp;
18
char *cp;
19
 
20
void function ()
21
{
22
  cp = ccp;             /* { dg-error "" } */
23
  cp = vcp;             /* { dg-error "" } */
24
}
25
 
26
int main () { return 0; }

powered by: WebSVN 2.1.0

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