Closed maxima120 closed 2 years ago
I just ran your sample as:
moodycamel::ConcurrentQueue<int> q; q.enqueue(25); int item; bool found = q.try_dequeue(item); printf("QUEUE: (%d) DATA: %d\n", found, item);
and got warning while compiling:
concurrentqueue.h:2492:29: warning: inlining failed in call to ‘bool moodycamel::ConcurrentQueue<T, Traits>::ImplicitProducer::enqueue(U&&) [with moodycamel::ConcurrentQueue<T, Traits>::AllocationMode allocMode = moodycamel::ConcurrentQueue<int, moodycamel::ConcurrentQueueDefaultTraits>::CanAlloc; U = int; T = int; Traits = moodycamel::ConcurrentQueueDefaultTraits]’: --param max-inline-insns-single limit reached [-Winline] 2492 | inline bool enqueue(U&& element) | ^~~~~~~ concurrentqueue.h:1381:125: note: called from here 1381 | return producer == nullptr ? false : producer->ConcurrentQueue::ImplicitProducer::template enqueue<canAlloc>(std::forward<U>(element)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
I would like to have no warnings. Could someone please help - can I inline without warnings or shall i remove all inline specifiers?
Never seen this one before.
Try passing -finline-limit=2048 or progressively higher values until the warning goes away.
-finline-limit=2048
sorry it was my fault. I commented out #pragma once (for unknown reason :))
I just ran your sample as:
and got warning while compiling:
I would like to have no warnings. Could someone please help - can I inline without warnings or shall i remove all inline specifiers?