Skip to content

Conversation

@orgads
Copy link
Contributor

@orgads orgads commented Mar 22, 2023

No description provided.

@xeioex
Copy link
Contributor

xeioex commented Mar 22, 2023

Hi @orgads,

How can I reproduce the issue? What compiler do you use?

@orgads
Copy link
Contributor Author

orgads commented Mar 22, 2023

Very old GCC 4.1.2 :)

@xeioex
Copy link
Contributor

xeioex commented Mar 23, 2023

Hi @orgads,

Unlike nginx, in njs we are not trying to be compatible with any C compiler.
In nginx there is NGX_SUPPRESS_WARN macro, which allows to put overhead initialization code for compilers which fail to see that initialization is unnecessary. We do not have such macro in njs.

We are trying to be compatible with modern (available on active and working systems) compilers on UNIX-like systems though.

If you nevertheless want to compile with gcc 4.1 consider providing extra compilation options using --cc-opt="-w" to suppress the warnings.

@orgads
Copy link
Contributor Author

orgads commented Mar 23, 2023

Is there a way to pass configure flags when building as a module?

@xeioex
Copy link
Contributor

xeioex commented Mar 23, 2023

@orgads,

njs build inherits the CC and CFLAGS from nginx build.

@orgads
Copy link
Contributor Author

orgads commented Mar 23, 2023

I see, thank you.

@orgads orgads closed this Mar 23, 2023
@orgads orgads deleted the math-uninit branch March 23, 2023 06:06
@xeioex
Copy link
Contributor

xeioex commented Mar 23, 2023

@orgads

Just provide --with-cc-opt='-w' to nginx configure.

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.

2 participants