diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp
index b98bce92f362e9111be65ea9761a604800f5a807..80832275804719a750f472fa9564e4380f319654 100644
--- a/src/libs/cplusplus/pp-engine.cpp
+++ b/src/libs/cplusplus/pp-engine.cpp
@@ -739,6 +739,10 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
     env->currentLine = 0;
 
     while (true) {
+
+        if (_dot->joined)
+            out("\\");
+
         processNewline();
 
         if (_dot->is(T_EOF_SYMBOL)) {
@@ -766,10 +770,7 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
 
         } else {
 
-            if (_dot->joined)
-                out("\\\n");
-
-            else if (_dot->whitespace) {
+            if (_dot->whitespace) {
                 const unsigned endOfPreviousToken = (_dot - 1)->end();
                 const unsigned beginOfToken = _dot->begin();