fixed bug #456235
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 7 Sep 2001 14:35:08 +0000 (14:35 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 7 Sep 2001 14:35:08 +0000 (14:35 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1240 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCicode.c
support/Util/SDCCerr.c
support/Util/SDCCerr.h

index 4be5f204cb185f238cce4a339bc1e9f5bd593ebe..7ffaac40d1d9c231f827a45684ae888fff1ae5c4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2001-09-07    <johan@FRIJA>
 
+       * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
+
        * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
 
 2001-09-06    <johan@FRIJA>
index 4dab87ed2e64f88ecea9eea12987182014d445e8..c5bc3f15eb8a77665fb0ac47d42c1598531d7ad5 100644 (file)
@@ -474,6 +474,10 @@ newiCodeCondition (operand * condition,
 {
   iCode *ic;
 
+  if (IS_VOID(OP_SYMBOL(condition)->type)) {
+    werror(E_VOID_VALUE_USED);
+  }
+
   ic = newiCode (IFX, NULL, NULL);
   IC_COND (ic) = condition;
   IC_TRUE (ic) = trueLabel;
index d3f54cb61b439a66bde84fbcc0449de1b558e2a5..fd5d6a2033033e668646e3d680a4cf87f388cc25 100644 (file)
@@ -358,7 +358,9 @@ struct
 { E_CANNOT_USE_GENERIC_POINTER, ERROR_LEVEL_ERROR,
     "cannot use generic pointer %s to initialize %s" },
 { W_EXCESS_SHORT_OPTIONS, ERROR_LEVEL_WARNING,
-    "Only one short option can be specified at a time.  Rest of %s ignored." }
+    "Only one short option can be specified at a time.  Rest of %s ignored." },
+{ E_VOID_VALUE_USED, ERROR_LEVEL_ERROR,
+    "void value not ignored as it ought to be" },
 };
 
 /*
index 24d28264fc247b9a795a62cba0e74a452c904e92..8bcd4c48807e27c19cb4541db16df29f6a57839a 100644 (file)
@@ -167,7 +167,8 @@ SDCCERR - SDCC Standard error handler
 #define W_STRAY_BACKSLASH 149
 #define W_NEWLINE_IN_STRING 150 
 #define E_CANNOT_USE_GENERIC_POINTER 151
-#define  W_EXCESS_SHORT_OPTIONS 152
+#define W_EXCESS_SHORT_OPTIONS 152
+#define E_VOID_VALUE_USED 153
 
 /** Describes the maximum error level that will be logged.  Any level
  *  includes all of the levels listed after it.