2019-02-25 20:17:14 +00:00
|
|
|
#include <IO/WriteHelpers.h>
|
|
|
|
#include <IO/WriteBufferFromFileDescriptor.h>
|
|
|
|
|
|
|
|
|
2019-02-26 10:53:35 +00:00
|
|
|
/** 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-02-25 20:17:14 +00:00
|
|
|
using namespace DB;
|
|
|
|
|
|
|
|
|
2019-12-15 06:34:43 +00:00
|
|
|
static void NO_INLINE write(WriteBuffer & out, size_t size)
|
2019-02-25 20:17:14 +00:00
|
|
|
{
|
|
|
|
for (size_t i = 0; i < size; ++i)
|
|
|
|
{
|
|
|
|
writeIntText(i, out);
|
2019-02-25 20:21:05 +00:00
|
|
|
writeChar(' ', out);
|
2019-02-25 20:17:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int main(int, char **)
|
|
|
|
{
|
|
|
|
WriteBufferFromFileDescriptor out(STDOUT_FILENO);
|
2019-02-25 20:29:56 +00:00
|
|
|
write(out, 80);
|
2019-02-25 20:17:14 +00:00
|
|
|
return 0;
|
|
|
|
}
|