Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void f(char c, signed char sc, unsigned char uc)
- {
- char∗ pc = &uc; // error : no pointer conversion
- signed char∗ psc = pc; // error : no pointer conversion
- unsigned char∗ puc = pc; // error : no pointer conversion
- psc = puc; // error : no pointer conversion
- }
- void g(char c, signed char sc, unsigned char uc)
- {
- c = 255; // implementation-defined if plain chars are signed and have 8 bits
- c = sc; // OK
- c = uc; // implementation-defined if plain chars are signed and if uc’s value is too large
- sc = uc; // implementation defined if uc’s value is too large
- uc = sc; // OK: conversion to unsigned
- sc = c; // implementation-defined if plain chars are unsigned and if c’s value is too large
- uc = c; // OK: conversion to unsigned
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement