Using the below pragma
#pragma warning disable = 329
warning C329: single-line comment contains line-continuation
Interesting - but you will just fix your code, won't you...?
Probably not. The lines that the compiler's complaining about are comments. These particular comments are in a file that converts raw A/D values into meaningful sensor values, and are ASCII text drawings of the sensor circuitry. For example, consider this type of comment block:
// |\ X1 AMP // | // +---| +---[TP] // | | / // | |/
Boy... that didn't show up in the forum that way it looked when I pasted it into my reply! Can't seem to get the forum to display leading spaces in front of my primitive drawing char's, whether I use the pre /pre markers or not. The bottom line is that I have a comment of the '//' type, and the compiler's not ignoring everything after that comment identifier. Programs I write using Microsoft Visual C++ don't complain during the build process when I end a '//' comment with the '\' character, even when I have the compiler set to complain about anything and everything.
First off, a side remark: why use single-line comments for a half-page block comment? I thought that everything after the '//' comment was supposed to be ignored. Well, almost, but not quite everything. The technical details set aside, suffice it to say that processing of backslash-linebreak line continuation is done by the preprocessor before it interprets comment characters. I.e.
//int foo = 42;
The forum software turned this:
// int foo = 42;
Your points are well taken. Without getting into a philosophical debate about coding styles, etc., the bottom line is that I'm just trying to foster continuous improvement of the tools and report what looks like a bug to me.
In the meantime you'll probably find that wrapping the whole block in a #if 0 #endif will get rid of the warning.
"Without getting into a philosophical debate about coding styles, etc" I think you deserve significant Brownie points for your endevours in documenting your code! Could you not just use the conventional /*...*/ comments, though?
Of course, and I have done so. The warnings that I could not disable via the pragma have been eliminated via /* */ style comment blocks instead, as suggested. As I stated earlier... I'm just trying to give some feedback to the KEIL team so that they can improve their product when and if they so desire. I know this is not a "big deal". Nonetheless, sometimes looking into the cause of a bug can yield insights into previously unknown problems that may be significantly more important. To me, it's always better to have ALL bugs reported, rather than just the ones that someone may think are important or worthwhile at some time.