that calls emacs-rc-cedet.el
To do the testing, I removed everything in my .emacs.d,
except for emacs-rc-cedet.el
, and init.el
only loads emacs-rc-cedet.el.
I also have latest CEDET, cloned from the github mirror: https://github.com/alexott/cedet
. I opened
(not in linux source tree) jiffies.h
, run "semantic-lex-test". Strangely, it works fine this time. I cloned my .emacs.d directory again and tested one more time, this file with the jiffies.h
in the kernel source tree, located at ~/linux/include/linux/jiffies.h
(as you can see I added "linux/" directory to semantic-system-include
in my emacs-rc-cedet.el
I got the error at line 256:
#if !((((NSEC_PER_SEC << 2) / TICK_NSEC) << (SEC_JIFFIE_SC - 2)) & 0x80000000)
The error is:
Idle Parse Error: "#<buffer jiffies.h> - Arithmetic error"
Parsing jiffies.h (LL)... [3 times]
Parsing jiffies.h (LL)...
Error running timer `semantic-idle-scheduler-function': (arith-error)
To test it further, I deleted that CEDET and downloaded the one from bzr and setup as above. The result is the same.
I also tested with stock CEDET bundled with my Emacs: GNU Emacs 184.108.40.206 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2014-05-05 on xtuudoo-Satellite-L640
I guess if I can parse once, reparsing won't have any error. When CEDET successfully parsed the standalone file jiffies.h not in linux source tree, it can successfully parse jiffies.h in the linux source tree.
My repository is battery included, so after your cloned it, you only need to run your emacs as normal. Note that you must use emacs from trunk, not even the pre-test version. Otherwise, there will be error when loading compiled packages. External dependency is GNU Global, and that's it. After you clone my repo, please try it on the two files again.
One more thing: Is this how you setup CEDET with gcc?
After setting up, does CEDET use GCC for parsing?
Lastly, after applying your patch, the error goes away.
Thanks for your detailed response.