Fixed PR#596:
Add parenthesis around the value being negated; that way, if the value
begins with a minus sign (e.g. negative integer), we won't generate a
C predecrement operator by mistake.

llvm-svn: 22437
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp
index f821a77..b29187b 100644
--- a/llvm/lib/Target/CBackend/Writer.cpp
+++ b/llvm/lib/Target/CBackend/Writer.cpp
@@ -1361,9 +1361,9 @@
   // If this is a negation operation, print it out as such.  For FP, we don't
   // want to print "-0.0 - X".
   if (BinaryOperator::isNeg(&I)) {
-    Out << "-";
+    Out << "-(";
     writeOperand(BinaryOperator::getNegArgument(cast<BinaryOperator>(&I)));
-
+    Out << ")";
   } else {
     writeOperand(I.getOperand(0));