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

BUG: etime.h never included, with filename macro #122

Open
fiveseven-lambda opened this issue Aug 22, 2023 · 0 comments
Open

BUG: etime.h never included, with filename macro #122

fiveseven-lambda opened this issue Aug 22, 2023 · 0 comments

Comments

@fiveseven-lambda
Copy link

My project has a file named etime.h. When the 'Macro Type' is set to 'Filename', this file is never included, because the auto-generated include guard is named ETIME.

The following code reproduces the bug:

main.cpp

#include <iostream>
#include "etime.h"

int main(){
    greet();
}

etime.h

#ifndef ETIME
#define ETIME

int greet(){
    std::cout << "hello" << std::endl;
}

#endif /* ETIME */

Expected behavior: If the filename begins with e, avoid the macro name beginning with E by a digit or an uppercase letter (say, by inserting _ after E).

I'm using Arch Linux and gcc (GCC) 13.2.1.

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