Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VFide: Preprocessing error when including same header via different paths. #38

Open
necto opened this issue Jun 28, 2016 · 0 comments
Open

Comments

@necto
Copy link
Contributor

necto commented Jun 28, 2016

This is a tricky bug in the current snapshot of VeriFast. Here are the steps to reproduce:
1. create a directory ./tst
2. create files with the following contents.
./tst/tst.c :

#include "tst.h"
#include "tst/tst.h"

and ./tst/tst.h :

#ifndef _GUARD_
#define _GUARD_
#include <stdlib.h>
#endif

Resulting in this directory structure:

└── tst
    ├── tst.c
    └── tst.h

3. Run vfide -I . (Note: do it from the parent directory of tst)
4. Open the tmp/tst.c from inside the IDE (it is important not to supply it directly as vfide -I . tst/tst.c)
5. If you hit the verify button, you should get:

Preprocessing error: Different amount of tokens were consumed by normal and context-free preprocessors

Note: the same example works perfectly with verifast or when you open it directly with vfide -I . tst/tst.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant