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

Multiple defined in the same line #499

Open
Qpupier opened this issue Jun 10, 2024 · 1 comment
Open

Multiple defined in the same line #499

Qpupier opened this issue Jun 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Qpupier
Copy link

Qpupier commented Jun 10, 2024

Description
Multiple defined in the same line creates an error.

Erroneous code

if (defined(__linux__) && defined(__amd64__))

This return Unexpected tokens after the constant expression and the rest of the file is not checked.

Additional infos
norminette 3.3.55

@NiumXp
Copy link
Contributor

NiumXp commented Jun 20, 2024

Hello, @Qpupier!

I was unable to replicate your bug in the version you showed and in the latest version.

Latest version (if you git clone norminette):

(.venv) niumxp@DESKTOP-LRN507C:~/oss/norminette$ cat test.c
int     main(void)
{
        if (defined(__linux__) && defined(__amd64__))
                return (1);
        return (0);
}
(.venv) niumxp@DESKTOP-LRN507C:~/oss/norminette$ norminette test.c
test.c: Error!
Error: INVALID_HEADER       (line:   1, col:   1):      Missing or invalid 42 header
(.venv) niumxp@DESKTOP-LRN507C:~/oss/norminette$ norminette --version
norminette3.3.55, Python 3.10.12, Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35

Your version is the commit 7de5543:

(.venv) niumxp@DESKTOP-LRN507C:~/oss/norminette$ git checkout 7de5543e6e7b5f558d2ee5d1189a3d9c139621f2
Note: switching to '7de5543e6e7b5f558d2ee5d1189a3d9c139621f2'.

[...]
(.venv) niumxp@DESKTOP-LRN507C:~/oss/norminette$ norminette --version
norminette 3.3.55
(.venv) niumxp@DESKTOP-LRN507C:~/oss/norminette$ norminette test.c
test.c: Error!
Error: INVALID_HEADER       (line:   1, col:   1):      Missing or invalid 42 header

@Asandolo Asandolo added the bug Something isn't working label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants