Tracker: Bugs

5 Minimal example for not working macro expansion - ID: 3535102
Last Update: Comment added ( defun )

Consider the following three files:

minimal-example.h:

#ifndef MINIMAL_H
#define MINIMAL_H

#define HIDEIT _
#define HIDECAT1(x,y) x ## y ## x
#define HIDECAT(x,y) HIDECAT1(x,y)

#endif

minimal-example2.h:

#ifndef MINIMAL_2_H
#define MINIMAL_2_H

#define PUFFERHIDE(x) HIDECAT(HIDEIT,x)

struct test_struct {
int a;
int PUFFERHIDE(b);
};

typedef struct test_struct * test_p;

#endif

minimal.c:

#include "minimal-example.h"
#include "minimal-example2.h"

int main(int argc, char * argv[]) {
test_p pup;
pup->
}

If you press C-c , <SPC> after pup-> the member _b_ will not show up.


Eric Wolf ( defun ) - 2012-06-13 23:52:02 PDT

5

Open

None

Nobody/Anonymous

semantic

None

Public


Comment ( 1 )




Date: 2012-06-13 23:54:46 PDT
Sender: defun

emacs 24.1
M-x list-packages tells me
semantic 2.0
cedet 1.0pre7



Log in to comment.

Attached Files ( 3 )

Filename Description Download
minimal-example.h Download
minimal-example2.h Download
minimal.c Download

Changes ( 3 )

Field Old Value Date By
File Added 446079: minimal.c 2012-06-13 23:52:51 PDT defun
File Added 446078: minimal-example2.h 2012-06-13 23:52:41 PDT defun
File Added 446077: minimal-example.h 2012-06-13 23:52:08 PDT defun