Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] C Declaration vs Definition and F3

That's the design intent. When you look for a symbol, you usually want to see the implementation of it. So we put the definitions first before the declarations. This is similar in spirit to JDT. When you hit F3, you are usually looking up the stack to see how things are implemented.

:Doug

On Mon, Nov 9, 2009 at 4:28 PM, Jeff Johnston <jjohnstn@xxxxxxxxxx> wrote:
I have a C library project which has the C library headers in it.

The ctype.h header has an external global pointer __ctype_ptr__ which is declared:

extern char * __ctype_ptr__;

In the library, the definition of __ctype_ptr__ is found in _ctype.c:

char *__ctype_ptr__ = __ctable;

which is put into the C library archive file.

In ispunct.c, I have a reference to __ctype_ptr__.  When I select __ctype_ptr__ from the C editor and hit F3, I am getting the definition of __ctype_ptr__ opened up in _ctype.c.  If I hit F3 on it, I then get the declaration in ctype.h.

I would have expected to see the header file declaration first.  Is this designed behavior?

I am using CDT 6.0.1.

-- Jeff J.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top