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

Two warnings under NVCC #752

Closed
henryiii opened this issue May 29, 2018 · 1 comment
Closed

Two warnings under NVCC #752

henryiii opened this issue May 29, 2018 · 1 comment

Comments

@henryiii
Copy link
Contributor

henryiii commented May 29, 2018

When compiling with CUDA 8 and moving from fmt 4 to 5, I get hundreds of pages of warnings that I think boil down to two:

1

extern/fmt/include/fmt/core.h(978): warning: integer conversion resulted in a change of sign

fmt/include/fmt/core.h

Lines 976 to 979 in 5386f1d

static FMT_CONSTEXPR uint64_t get_types() {
return IS_PACKED ? internal::get_types<Context, Args...>()
: -static_cast<int64_t>(NUM_ARGS);
}

I'm not sure how this could be correct, -int is returned as uint without explicit cast?

2

extern/fmt/include/fmt/core.h(791): warning: nonstandard use of "auto" to both deduce the type from an initializer and to announce a trailing return type

fmt/include/fmt/core.h

Lines 789 to 797 in 5386f1d

basic_format_arg<Context> find(basic_string_view<char_type> name) const {
// The list is unsorted, so just return the first matching name.
for (auto it = map_, end = map_ + size_; it != end; ++it) {
if (it->name == name)
return it->arg;
}
return basic_format_arg<Context>();
}
};

Could this odd auto and comma be replaced by a decltype? (and comma, unfortunately)

vitaut added a commit that referenced this issue Jun 4, 2018
@vitaut
Copy link
Contributor

vitaut commented Jun 4, 2018

Fixed in 911a751, thanks.

@vitaut vitaut closed this as completed Jun 4, 2018
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

2 participants