ARM Technical Support Knowledge Articles

SOURCE LINE AFTER A COMMENT IS IGNORED

Applies to: uVision IDE

Answer


Information in this article applies to:


SYMPTOMS

I have a comment line following by a source code line:

// this is my comment P1 = 0xAA;

When I build my project it appears that the source code line is being ignored! This is causing all kinds of problems for my application.

CAUSE

The '' character directs the C compiler to concatenate the following line with the current line. In the example above, this causes the source code line to be joined onto the end of the comment, and therefore comments the code out.

RESOLUTION

Remove the '' from the end of the comment.

Article last edited on: 2000-10-05 00:00:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential