Skip to content
Snippets Groups Projects
  • Jonathan Wakely's avatar
    3a817a4a
    libstdc++: Remove unnecessary uses of <stdint.h> · 3a817a4a
    Jonathan Wakely authored
    We don't need to include all of <stdint.h> when we only need uintptr_t
    from it. By using GCC's internal macro we avoid unnecessarily declaring
    everything in <stdint.h>. This helps users to avoid accidentally relying
    on those names being declared without explicitly including the header.
    
    libstdc++-v3/ChangeLog:
    
    	* include/bits/align.h (align, assume_aligned): Use
    	__UINTPTR_TYPE__ instead of uintptr_t. Do not include
    	<stdint.h>.
    	* include/bits/atomic_base.h (__atomic_ref): Likewise.
    	* include/bits/atomic_wait.h (__waiter_pool_base::_S_for):
    	Likewise.
    	* include/std/atomic: Include <cstdint>.
    3a817a4a
    History
    libstdc++: Remove unnecessary uses of <stdint.h>
    Jonathan Wakely authored
    We don't need to include all of <stdint.h> when we only need uintptr_t
    from it. By using GCC's internal macro we avoid unnecessarily declaring
    everything in <stdint.h>. This helps users to avoid accidentally relying
    on those names being declared without explicitly including the header.
    
    libstdc++-v3/ChangeLog:
    
    	* include/bits/align.h (align, assume_aligned): Use
    	__UINTPTR_TYPE__ instead of uintptr_t. Do not include
    	<stdint.h>.
    	* include/bits/atomic_base.h (__atomic_ref): Likewise.
    	* include/bits/atomic_wait.h (__waiter_pool_base::_S_for):
    	Likewise.
    	* include/std/atomic: Include <cstdint>.