Misconception '\' in software compilation error

I use macros as below in my C program to develop a POS application. When I compile this code, I am mistaken "\" in a program error. Can someone help me in solving this?

#define FF(a, b, c, d, x, s, ac) \
  {(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
   (a) = ROTATE_LEFT ((a), (s)); \
   (a) += (b); \

      }
+5
source share
2 answers

Delete the line before the closing bracket.

(a) += (b); \
             <----
}

Also, as a style, you should at least align the backslash.

+7
source

Most compilers give you some way to get a pre-processed form of your code. With gccthat gcc -C -E source.c > source.i; you must study this form. On Linux, I sometimes do:

gcc -C -E source.c | grep -v '^#' | indent > source.i
gcc -Wall -c source.i

grep -v '^#' . source.i , , .

+3

All Articles