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

C/C++ compiler flag -MMD creates -.d file #2265

Closed
ranebrown opened this issue Feb 1, 2019 · 1 comment · Fixed by #2590
Closed

C/C++ compiler flag -MMD creates -.d file #2265

ranebrown opened this issue Feb 1, 2019 · 1 comment · Fixed by #2590
Labels

Comments

@ranebrown
Copy link

Vim version: 8.1
OS: macOS Mojave 10.14.3

I am using the flag -MMD to generate dependency files to determine when a header has been changed. Since more compiler flags are now being parsed this flag causes a file with the name of -.d to be generated in the working directory.

I believe this is related to #2131 (possibly #2168 or #2194).

This flag should be ignored since it doesn't provide any useful linting information.

Thanks!

@w0rp
Copy link
Member

w0rp commented Feb 8, 2019

There will probably be some flags we shouldn't pass, like -o for example.

I did tell them. Feel free to create a pull request to filter flags like these out.

@w0rp w0rp added the bug label Feb 8, 2019
w0rp pushed a commit that referenced this issue Aug 17, 2019
* Parse CFLAGS that can be passed using a whitelist

I went through GCC's man page and selected flags that can safely be
passed to GCC and that can be useful to syntax checking. These include:

- -I/-i* include flags
- preprocessor flags such as -D
- -W* warning flags
- -O* optimization flags
- most -f options
- -m arch dependent options

* Fix CFLAGS tests: -Idir is now parsed to -I dir
* Added two tests for flags we want or don't want to pass.
* Also check for / in addition to s:sep
suoto pushed a commit to suoto/ale that referenced this issue Sep 11, 2019
…analysis#2590)

* Parse CFLAGS that can be passed using a whitelist

I went through GCC's man page and selected flags that can safely be
passed to GCC and that can be useful to syntax checking. These include:

- -I/-i* include flags
- preprocessor flags such as -D
- -W* warning flags
- -O* optimization flags
- most -f options
- -m arch dependent options

* Fix CFLAGS tests: -Idir is now parsed to -I dir
* Added two tests for flags we want or don't want to pass.
* Also check for / in addition to s:sep
timlag1305 pushed a commit to timlag1305/ale that referenced this issue Nov 5, 2019
…analysis#2590)

* Parse CFLAGS that can be passed using a whitelist

I went through GCC's man page and selected flags that can safely be
passed to GCC and that can be useful to syntax checking. These include:

- -I/-i* include flags
- preprocessor flags such as -D
- -W* warning flags
- -O* optimization flags
- most -f options
- -m arch dependent options

* Fix CFLAGS tests: -Idir is now parsed to -I dir
* Added two tests for flags we want or don't want to pass.
* Also check for / in addition to s:sep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants