summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f86f886)
* src/SDCCast.c (addCast): Fixed bug
1571231: promote in case of RESULT_TYPE_IFX
* support/regression/tests/onebyte.c: added test
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4403
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2006-10-06 Bernhard Held <bernhard AT bernhardheld.de>
+
+ * src/SDCCglue.c (tempfileandname): changed un*x tmp search paths
+ to /tmp and /var/tmp acc. LSB
+ * src/SDCCast.c (addCast): Fixed bug 1571231: promote in case of
+ RESULT_TYPE_IFX
+ * support/regression/tests/onebyte.c: added test
+
2006-10-05 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
* src/mcs51/gen.c: emitcode for "add a,0x%02x" requires only 8 bits.
2006-10-05 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
* src/mcs51/gen.c: emitcode for "add a,0x%02x" requires only 8 bits.
newLink = newIntLink();
upCasted = TRUE;
break;
newLink = newIntLink();
upCasted = TRUE;
break;
- if (!promote)
- return tree;
- /* return type is long, float: promote char to int */
- if (getSize (tree->etype) >= INTSIZE)
+ if (!promote ||
+ /* return type is ifx, long, float: promote char to int */
+ getSize (tree->etype) >= INTSIZE)
return tree;
newLink = newIntLink();
upCasted = TRUE;
return tree;
newLink = newIntLink();
upCasted = TRUE;
/** Creates a temporary file with unique file name
Scans, in order:
- TMP, TEMP, TMPDIR env. variables
/** Creates a temporary file with unique file name
Scans, in order:
- TMP, TEMP, TMPDIR env. variables
- - if Un*x system: /usr/tmp and /tmp
+ - if Un*x system: /tmp and /var/tmp
- root directory using mkstemp() if available
- default location using tempnam()
*/
- root directory using mkstemp() if available
- default location using tempnam()
*/
- /* try with /usr/tmp and /tmp on Un*x systems */
+ /* try with /tmp and /var/tmp on Un*x systems */
struct stat statbuf;
if (tmpdir == NULL) {
struct stat statbuf;
if (tmpdir == NULL) {
- if (stat("/usr/tmp", &statbuf) != -1)
- tmpdir = "/usr/tmp";
- else if (stat("/tmp", &statbuf) != -1)
+ if (stat("/tmp", &statbuf) != -1)
+ else if (stat("/var/tmp", &statbuf) != -1)
+ tmpdir = "/var/tmp";
sc = -128;
ASSERT(-sc == 128);
}
sc = -128;
ASSERT(-sc == 128);
}
+
+void
+testBug1571231(void)
+{
+ unsigned char {attrL} uc;
+
+ /* bug-1571231 */
+ uc = 0x80;
+ if (uc + 0x80)
+ ASSERT(1);
+ else
+ ASSERT(0);
+}