Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316673 - Parser thinks getting labels as values is a syntax error
Summary: Parser thinks getting labels as values is a syntax error
Status: CLOSED DUPLICATE of bug 84144
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Mike Kucera CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-12 01:24 EDT by Stephen Pape CLA
Modified: 2010-06-14 03:11 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 Stephen Pape CLA 2010-06-12 01:24:24 EDT
Build Identifier: 20100218-1602

GCC allows you to get the address of a label using the && operator.

Example Code
--------------
somelabel:
	void* ptr;
	ptr = &&somelabel;
--------------

Eclipse underlines the line containing && in yellow and claims it's a syntax error, though the code compiles fine.

More information can be found here: http://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html

Reproducible: Always

Steps to Reproduce:
1.Create a C/C++ project and source file
2.Use a label
3.Attempt to get the address of the label
Comment 1 Markus Schorn CLA 2010-06-14 03:11:26 EDT

*** This bug has been marked as a duplicate of bug 84144 ***