Bugs item #656555, was opened at 2002-12-20 00:54
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104664&aid=656555&group_id=4664
Category: C lexer/parser
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Hans-Bernhard Broeker (broeker)
Summary: #include MACRO(x) does not work
Initial Comment:
when a file includes other files by via macro definition, those inclusions are not tracked. for example,
#define MACRO(x) #x
#include MACRO(stdio.h)
MACRO(stdio.h) should appear on the included list.
----------------------------------------------------------------------
>Comment By: Hans-Bernhard Broeker (broeker)
Date: 2003-01-13 16:12
Message:
Logged In: YES
user_id=27517
Adding MACRO(stdio.h) to the internal list of "included
files" would be relatively simple. But the only thing this
would change would be that you could run "Find files
#including this file" queries with "MACRO(stdio.h)" or
similar as the search pattern.
This would never behave equally to lines
#include <stdio.h>
or #include "stdio.h"
though, because cscope doesn't evaluate macros. In
particular, the file really referred to wouldn't ever be
included in the cscope database because of this line. You
wouldn't be able to "Find this file", either, since cscope
doesn't know that the actual name of the file to be opened
is.
IMHO, this whole concept is abusing the C preprocessor, and
cscope may well be better off not supporting it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104664&aid=656555&group_id=4664

Bugs item #656555, was opened at 2002-12-20 00:54
Message generated for change (Comment added) made by broeker
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104664&aid=656555&group_id=4664
Category: C lexer/parser
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Hans-Bernhard Broeker (broeker)
Summary: #include MACRO(x) does not work
Initial Comment:
when a file includes other files by via macro definition, those inclusions are not tracked. for example,
#define MACRO(x) #x
#include MACRO(stdio.h)
MACRO(stdio.h) should appear on the included list.
----------------------------------------------------------------------
>Comment By: Hans-Bernhard Broeker (broeker)
Date: 2003-10-15 16:18
Message:
Logged In: YES
user_id=27517
The person who posted this has meanwhile settled on
modifying their local copy of cscope. I'm closing this as
"Won't Fix".
----------------------------------------------------------------------
Comment By: Hans-Bernhard Broeker (broeker)
Date: 2003-01-13 16:12
Message:
Logged In: YES
user_id=27517
Adding MACRO(stdio.h) to the internal list of "included
files" would be relatively simple. But the only thing this
would change would be that you could run "Find files
#including this file" queries with "MACRO(stdio.h)" or
similar as the search pattern.
This would never behave equally to lines
#include <stdio.h>
or #include "stdio.h"
though, because cscope doesn't evaluate macros. In
particular, the file really referred to wouldn't ever be
included in the cscope database because of this line. You
wouldn't be able to "Find this file", either, since cscope
doesn't know that the actual name of the file to be opened
is.
IMHO, this whole concept is abusing the C preprocessor, and
cscope may well be better off not supporting it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104664&aid=656555&group_id=4664