mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
29 lines
544 B
C++
29 lines
544 B
C++
#include <IO/WriteHelpers.h>
|
|
#include <IO/WriteBufferFromFileDescriptor.h>
|
|
|
|
|
|
/** gcc-7 generates wrong code with -O1 -finline-small-functions -ftree-vrp
|
|
* This is compiler bug. The issue does not exist in gcc-8 or clang-8.
|
|
*/
|
|
|
|
|
|
using namespace DB;
|
|
|
|
|
|
static void NO_INLINE write(WriteBuffer & out, size_t size)
|
|
{
|
|
for (size_t i = 0; i < size; ++i)
|
|
{
|
|
writeIntText(i, out);
|
|
writeChar(' ', out);
|
|
}
|
|
}
|
|
|
|
|
|
int main(int, char **)
|
|
{
|
|
WriteBufferFromFileDescriptor out(STDOUT_FILENO);
|
|
write(out, 80);
|
|
return 0;
|
|
}
|