diff --git a/libstdc++-v3/include/experimental/random b/libstdc++-v3/include/experimental/random
index 2c2b359ff4188b660233e51d77ce4e1941d6c4a4..d7431e33e98912139cf9fc6ed138568991818682 100644
--- a/libstdc++-v3/include/experimental/random
+++ b/libstdc++-v3/include/experimental/random
@@ -50,6 +50,7 @@ inline namespace fundamentals_v2 {
 
   // 13.2.2.1, Function template randint
   template<typename _IntType>
+    [[__nodiscard__]]
     inline _IntType
     randint(_IntType __a, _IntType __b)
     {