projects
/
fw
/
sdcc
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* support/regression/tests/bug-460010.c,
[fw/sdcc]
/
support
/
regression
/
tests
/
bug-460010.c
1
/* bug 460010
2
*/
3
#include <testfwk.h>
4
5
void
6
func( unsigned char a )
7
{
8
UNUSED(a);
9
}
10
11
void
12
testBadPromotion(void)
13
{
14
15
#ifdef SDCC
16
unsigned char c=*((unsigned xdata char*)(0xa000));
17
#else
18
unsigned char loc_c;
19
unsigned char c=*(unsigned char*)&loc_c;
20
#endif
21
22
func(c);
23
24
c+='0'; /* is evaluated as an 8-bit expr */
25
26
func(c);
27
28
c+='A'-'0'; /* is a 16-bit expr ??? */
29
30
func(c);
31
}