My previous mail reader deleted a pile of my old mail, so I'm bodging
this reply together.
The __THROW should be accounted for in the preprocessor map by default.
There are 5 symbols that show up by default which are:
("__THROW" . "")
("__const" . "const")
("__restrict" . "")
("__declspec" . ((spp-arg-list ("foo") 1 . 2)))
("__attribute__" . ((spp-arg-list ("foo") 1 . 2)))
As such, you shouldn't need your one set command below.
When I stuck the sample you provided in a buffer, it parsed fine. I
found that fcn in one of my local headers, and it was parsed fine there
I'd guess there might be something else in the header, such as a #ifdef
or other that might be getting in the way.
Sometimes the only way to figure it out is to take the header, parse it,
then start deleting large chunks of the buffer away till it does start
working, then you can narrow down what the problem is. Once you know
what it is, then it will probably be easy to come up with a workaround.
> i'm new to emacs and cedet.
> My problem: I want semantic to parse my system libraries and show nice
> function name completion.
> My .emacs file looks like this:
> (load-file "/usr/share/emacs/site-lisp/cedet-common/cedet.el")
> (set 'semantic-lex-c-preprocessor-symbol-map '("__THROW" . ""))
> (setq global-ede-mode t)
> (require 'semantic-ia)
> (require 'semantic-gcc)
> (require 'semanticdb)
> (semantic-add-system-include "/usr/include" 'c-mode)
> (defun my-cedet-hook ()
> (local-set-key [(control return)] 'semantic-ia-complete-symbol)
> (local-set-key "\C-c?" 'semantic-ia-complete-symbol-menu)
> (local-set-key "\C-c>" 'semantic-complete-analyze-inline)
> (local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle))
> (add-hook 'c-mode-common-hook 'my-cedet-hook)
> the problem now is: when i type msg \C -c? it offers the following
> functions to me (from /sys/msg.h)
> msgsnd( ... )
> msgrcv( ... )
> The definition of the function in the library h file:
> extern ssize_t msgrcv (int __msqid, void *__msgp, size_t __msgsz,
> long int __msgtyp, int __msgflg);
> But IT DOES NOT FIND:
> These functions are defined as
> extern int msgget (key_t __key, int __msgflg) __THROW;
> in the same file.
> My question: How can i get this functions too ?
> Seems to be a problem with the __THROW thing.
> (fprintf, printf, .. are also not indexed at all)