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

v1.14.1, GCC 14.2.1, With Precompiled Header -- Noisy Compilation From Spdlog #3223

Open
limitedAtonement opened this issue Oct 18, 2024 · 1 comment

Comments

@limitedAtonement
Copy link

I have a small example that reproduces the problem:

  1. git clone --recurse-submodules git@github.com:limitedAtonement/spdlog-problem
    • Clones the example repository and spdlog submodule at v1.14.1
    • To check the spdlog version, cd spdlog-problem/src/spdlog && git log --oneline --graph --decorate --all or whatever
  2. cd spdlog-problem
  3. git checkout origin/illustration
  4. make clean && make

I get output like

In file included from src/spdlog/include/spdlog/fmt/bundled/format.h:4530,                                                               
                 from src/spdlog/include/spdlog/fmt/bundled/core.h:2967,                                                                 
                 from src/spdlog/include/spdlog/fmt/fmt.h:24,                                                                                                                                                                                                                     
                 from src/spdlog/include/spdlog/common.h:50,
                 from src/spdlog/include/spdlog/spdlog.h:12,
                 from src/stdafx.hpp:1:                                                                                                                                                                                                                                           src/spdlog/include/spdlog/fmt/bundled/format-inl.h: In instantiation of ‘fmt::v10::detail::thousands_sep_result<Char> fmt::v10::detail::thousands_sep_impl(locale_ref) [with Char = wchar_t]’:
src/spdlog/include/spdlog/fmt/bundled/format.h:1268:37:   required from here                                                             
 1268 |   return thousands_sep_impl<wchar_t>(loc);      
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~                                                                                                                                                                                                                                 src/spdlog/include/spdlog/fmt/bundled/format-inl.h:95:9: warning: possibly dangling reference to a temporary [-Wdangling-reference]      
   95 |   auto& facet = std::use_facet<std::numpunct<Char>>(loc.get<std::locale>());                                                     
      |         ^~~~~                                               
src/spdlog/include/spdlog/fmt/bundled/format-inl.h:95:52: note: the temporary was destroyed at the end of the full expression ‘std::use_facet<__cxx11::numpunct<wchar_t> >(fmt::v10::detail::locale_ref::get() const [with Locale = std::locale]())’             
   95 |   auto& facet = std::use_facet<std::numpunct<Char>>(loc.get<std::locale>());                                                     
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~                                                      
In file included from src/spdlog/include/spdlog/fmt/bundled/format.h:4530,                                                                                                                                                                                                        
                 from src/spdlog/include/spdlog/fmt/bundled/core.h:2967,                                                                 
                 from src/spdlog/include/spdlog/fmt/fmt.h:24,
                 from src/spdlog/include/spdlog/common.h:50,                                                                                                                                                                                                                                       from src/spdlog/include/spdlog/spdlog.h:12,        
                 from src/stdafx.hpp:1:        
src/spdlog/include/spdlog/fmt/bundled/format-inl.h: In instantiation of ‘fmt::v10::detail::thousands_sep_result<Char> fmt::v10::detail::thousands_sep_impl(locale_ref) [with Char = wchar_t]’:
src/spdlog/include/spdlog/fmt/bundled/format.h:1268:37:   required from here                                                                                                                                                                                                       1268 |   return thousands_sep_impl<wchar_t>(loc);                                                                                       
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~                                                                                        
src/spdlog/include/spdlog/fmt/bundled/format-inl.h:95:9: warning: possibly dangling reference to a temporary [-Wdangling-reference]      
   95 |   auto& facet = std::use_facet<std::numpunct<Char>>(loc.get<std::locale>());                                                     
      |         ^~~~~                                               
src/spdlog/include/spdlog/fmt/bundled/format-inl.h:95:52: note: the temporary was destroyed at the end of the full expression ‘std::use_facet<__cxx11::numpunct<wchar_t> >(fmt::v10::detail::locale_ref::get() const [with Locale = std::locale]())’
   95 |   auto& facet = std::use_facet<std::numpunct<Char>>(loc.get<std::locale>());                                                     
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~                                                      
src/spdlog/include/spdlog/fmt/bundled/format-inl.h: In instantiation of ‘fmt::v10::detail::thousands_sep_result<Char> fmt::v10::detail::thousands_sep_impl(locale_ref) [with Char = char]’:
src/spdlog/include/spdlog/fmt/bundled/format.h:1263:41:   required from ‘fmt::v10::detail::thousands_sep_result<Char> fmt::v10::detail::thousands_sep(locale_ref) [with Char = char]’                                                            
 1263 |   auto result = thousands_sep_impl<char>(loc);                                                                                   
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~                                                                                    
src/spdlog/include/spdlog/fmt/bundled/format.h:2033:35:   required from ‘fmt::v10::detail::digit_grouping<Char>::digit_grouping(fmt::v10::detail::locale_ref, bool) [with Char = char]’
 2033 |     auto sep = thousands_sep<Char>(loc);     
      |                ~~~~~~~~~~~~~~~~~~~^~~~~      
src/spdlog/include/spdlog/fmt/bundled/format.h:2665:21:   required from ‘OutputIt fmt::v10::detail::do_write_float(OutputIt, const DecimalFP&, const fmt::v10::format_specs<Char>&, float_specs, locale_ref) [with OutputIt = fmt::v10::appender; DecimalFP = dragonbox::decimal_f
p<float>; Char = char; Grouping = digit_grouping<char>]’            
 2665 |     auto grouping = Grouping(loc, fspecs.locale);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~     
src/spdlog/include/spdlog/fmt/bundled/format.h:2730:26:   required from ‘OutputIt fmt::v10::detail::write_float(OutputIt, const DecimalFP&, const fmt::v10::format_specs<Char>&, float_specs, locale_ref) [with OutputIt = fmt::v10::appender; DecimalFP = dragonbox::decimal_fp<f
loat>; Char = char]’                                                
 2730 |     return do_write_float(out, f, specs, fspecs, loc);
      |            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~       
src/spdlog/include/spdlog/fmt/bundled/format.h:3665:21:   required from ‘OutputIt fmt::v10::detail::write(OutputIt, T) [with Char = char; OutputIt = fmt::v10::appender; T = float; typename std::enable_if<is_fast_float<T>::value, int>::type <anonymous> = 0]’
 3665 |   return write_float(out, dec, specs, fspecs, {});

The last commit on this branch adds the precompiled header. To get a clean build, use the previous commit without the precompiled header:

  1. git checkout HEAD^
  2. make clean && make -j
@tt4g
Copy link
Contributor

tt4g commented Oct 18, 2024

All files under directory include/spdlog/fmt/bundled are copied from the fmt repository.
Please report them in the fmt repository.

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