Bug 122241 - don't produce "multi-line comments"
Summary: don't produce "multi-line comments"
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-28 06:34 EST by Francis IELSCH CLA
Modified: 2020-09-04 15:23 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francis IELSCH CLA 2005-12-28 06:34:46 EST
CDT offers a useful feature to comment lines that are selected.
In C code, it is possible to split a line of code in more using "\" as shown below:
sprintf(strbuf, "\r\nReceive error at COM1: expected value = %02Xh, \
                              read value = %02Xh ", i, dummy);
If I select these two lines, make right-clic and select "Comment" in the context menu, these lines will be commented as shown below:
//sprintf(strbuf, "\r\nReceive error at COM1: expected value = %02Xh, \
//                              read value = %02Xh ", i, dummy);

When compiling with GCC, it will report a warning message: "multi-line comment".  In this case of lines of code which are split, it is only necessary to comment the first line (as shown below) instead of every split-part of the line:
//sprintf(strbuf, "\r\nReceive error at COM1: expected value = %02Xh, \
                              read value = %02Xh ", i, dummy);
With this syntax, GCC doesn't produce any warning.