Re: wrong-type-argument when parsing CPP using symbols from bovine/gcc
Eric Ludlam <[email protected]> Wed, 12 Aug 2015 18:23:46 -0400
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <[email protected]> |
Hi Daniel,
For a brief while, some versions of Emacs development had a broken
version of hide-if which resulted in errors like this. I tried Emacs
24.3, and 25.0 and neither reproduced the problem.
I'm not familiar with how hideif is tested or updated. Perhaps using
the version from one of these other Emacs versions will help?
Eric
On 08/12/2015 08:21 AM, Daniel Eklöf wrote:
> Hi,
>
> I'm having some problems with #defines defined by gcc (and thus picked up by bovine/gcc?).
> See version info below.
>
> Parsing this .h-file
>
> /* #undef __INT_MAX__ */
> /* #define __INT_MAX__ 0x7fffffff */
>
> #if __INT_MAX__ == 12345678
> #endif
>
> results in the following error:
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p "0x7fffffff")
> hif-equal("0x7fffffff" 12345678)
> eval((hif-equal (hif-lookup (quote __INT_MAX__)) 12345678))
> semantic-c-do-lex-if()
> semantic-c-lexer(1 97 nil nil)
> semantic-lex(1 97 nil)
> semantic-parse-region-default(1 97 nil nil nil)
> semantic-parse-region-c-mode(1 97 nil nil nil)
> semantic-parse-region(1 97)
> semantic-fetch-tags()
> byte-code("\212\212\300 \210*\301\207" [semantic-fetch-tags nil] 1)
> semantic-idle-scheduler-refresh-tags()
> byte-code(...)
> semantic-idle-core-handler()
> semantic-debug-idle-function()
> call-interactively(semantic-debug-idle-function record nil)
> command-execute(semantic-debug-idle-function record)
> execute-extended-command(nil "semantic-debug-idle-function")
> call-interactively(execute-extended-command nil nil)
> command-execute(execute-extended-command)
>
> It would seem like the value of __INT_MAX__ is, incorrectly, treated as a
> string rather than a number? The relevant(?) output of cpp:
>
> $ cpp -E -dM -x c++ < /dev/null|grep __INT_MAX__
> #define __INT_MAX__ 0x7fffffff
>
> Un-commenting the first two lines in the header file (#undef/#define)
> makes the error go away.
>
> Any ideas? Or suggestions on how to dig deeper?
>
> Versions:
>
> emacs 24.5.1
> cedet 2.0 (the one bundled with emacs)
>
> Requested File Loaded
> Package Version Version Version
> ----------------------------------------------------------
> cedet: 2.0 nil ok
> eieio: 1.4 nil ok
> semantic: 2.2 nil ok
> srecode: 1.2 nil Not Loaded
> ede: 1.2 nil ok
>
> Thanks,
> Daniel
>
> ------------------------------------------------------------------------------
> _______________________________________________
> cedet-semantic mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
>
------------------------------------------------------------------------------