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

Fix icc warnings #18

Closed
ompiteam opened this issue Sep 12, 2014 · 7 comments
Closed

Fix icc warnings #18

ompiteam opened this issue Sep 12, 2014 · 7 comments
Assignees
Labels
Milestone

Comments

@ompiteam
Copy link
Contributor

There's a truckload of warnings generated when icc 11.1.056 is used to compile hwloc. Most are in one of three types:

  • Variable/parameter is never referenced
  • Variable is set but never used
  • Mix enum with another type

The first two should probably be fixed; we may or may not care about fixing the third.

@ompiteam ompiteam added this to the v1.0 milestone Sep 12, 2014
@ompiteam ompiteam added the bug label Sep 12, 2014
@ompiteam
Copy link
Contributor Author

Imported from trac issue 17. Created by jsquyres on 2009-10-21T13:57:52, last modified: 2010-04-20T17:27:48

@ompiteam
Copy link
Contributor Author

Trac comment by jsquyres on 2009-12-01 08:47:32:

Chris Samuel pointed out another icc warning of the flavor:

{{{
icc: command line warning #10121: overriding '-stdc99' with '-stdgnu99'
icc: command line warning #10156: ignoring option '-W'; no argument required
}}}

The first one stems from the compile line, which you can see if you {{{make V=1}}}:

{{{
libtool: compile: icc -std=c99 -DHAVE_CONFIG_H -I. -I../include/private -I../include/hwloc -I../include -I../include -std=gnu99 -Wall -Wmissing-prototypes -Wundef -Wpointer-arith -Wcast-align -I/usr/include/libxml2 -g -O2 -MT topology.lo -MD -MP -MF .deps/topology.Tpo -c topology.c -fPIC -DPIC -o .libs/topology.o
}}}

You can see both "-std=c99" ''and'' "-std=gnu99", which -- at least at first blush -- doesn't seem right. Part of the problem ''might'' be in config/hwloc.m4:

{{{
if test "x$GCC" = "xyes"; then
GCC_CFLAGS="-std=gnu99 -Wall -Wmissing-prototypes -Wundef"
}}}

icc lies to impersonate gcc and probably allows the "are we using GCC?" test to fill $GCC with "yes", which could somehow lead to the repetitive -std option.

As for the -W warnings, I'm not sure specifically which one it is referring to, but it could also stem from the same test in hwloc.m4 (where icc is lying about being GCC). If it helps, we have a better detection m4 algorithm in Open MPI that ''really'' figures out if the compiler is GCC or not. Something to check into...

@ompiteam
Copy link
Contributor Author

Trac comment by sthibaul on 2010-01-04 12:39:15:

(In [1560]) fix icc's pickyness about parameter ordering (even if all these functions are marked const...); Refs #17

@ompiteam
Copy link
Contributor Author

Trac comment by sthibaul on 2010-01-04 12:40:47:

(In [1561]) avoid warning about maxwidth/maxheight not being always used. Refs #17

@ompiteam
Copy link
Contributor Author

Trac comment by sthibaul on 2010-01-04 12:55:22:

(In [1565]) fix icc's pickyness about parameter ordering (even if all these functions are marked const...); Refs #17

@ompiteam
Copy link
Contributor Author

Trac comment by sthibaul on 2010-01-04 13:01:36:

first and second types of warning should be fixed by now, except the dtd which could be looked at.

@ompiteam
Copy link
Contributor Author

Trac comment by bgoglin on 2010-04-20 17:27:48:

Most of these should be fixed or acceptable now, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants