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

Remove trailing \ from last line of exported function macros #44669

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

imciner2
Copy link
Contributor

The slash shouldn't be included on the last line of the macro, since it tells the compiler the next line should be considered as part of the current macro. This PR removes the slash from the last line of two macros inside jl_exported_funcs.inc, which also makes them consistent in style with the macros in the jl_exported_data.inc file. This also triggered a GCC warning on my machine because one of them was at the end of the file:

    CC cli/loader_lib.o
In file included from /home/imcinerney/dev/julia/main/v1.6/cli/jl_exports.h:6,
                 from /home/imcinerney/dev/julia/main/v1.6/cli/loader_lib.c:10:
/home/imcinerney/dev/julia/main/v1.6/cli/../src/jl_exported_funcs.inc:1:31: warning: backslash-newline at end of file
    1 | #define JL_EXPORTED_FUNCS(XX) \
      |                                
    CC cli/loader_trampolines.o
In file included from /home/imcinerney/dev/julia/main/v1.6/cli/trampolines/trampolines_x86_64.S:2:
/home/imcinerney/dev/julia/main/v1.6/cli/trampolines/../../src/jl_exported_funcs.inc:1:31: warning: backslash-newline at end of file
    1 | #define JL_EXPORTED_FUNCS(XX) \
      |                                

Note this warning clean-up is not contained in #44350 already.

@vtjnash
Copy link
Member

vtjnash commented Mar 18, 2022

There was supposed to be a trailing newline in this file to avoid the warning. Is that missing now?

@imciner2
Copy link
Contributor Author

imciner2 commented Mar 18, 2022

There doesn't appear to be a newline in the fie on master, but I think even if the newline silences removing the slashes is still good to remove them because then it makes these two macros consistent with the data exporting macros and the JL_RUNTIME_EXPORTED_FUNCS_WIN macro in this file.

@giordano
Copy link
Contributor

There was supposed to be a trailing newline in this file to avoid the warning. Is that missing now?

Merging #44350 and enabling -Werror in CI would have prevented this 🙂

@giordano
Copy link
Contributor

If there are no objections, I'm going to merge this PR on Tuesday

@giordano giordano merged commit ff0e25c into JuliaLang:master Mar 29, 2022
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

Successfully merging this pull request may close these issues.

3 participants