Re: Compilation warning on 9.5
От | Tom Lane |
---|---|
Тема | Re: Compilation warning on 9.5 |
Дата | |
Msg-id | 5543.1455306323@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Compilation warning on 9.5 (Vicky Vergara <vicky_vergara@hotmail.com>) |
Список | pgsql-hackers |
Vicky Vergara <vicky_vergara@hotmail.com> writes: > I wonder if -std=gnu99 is the correct standard to include postgres.h etc. in 9.5 > because that standard (and all the flags I am using to generate pgrouting code without warnings) > catches the following catches warnings of type conversions on some postgresql included files. It's not -std=gnu99 that's causing those messages, it's -pedantic and -Wconversion respectively. > /usr/include/postgresql/9.5/server/c.h:298:9: warning: ISO C does not support �__int128� type [-pedantic] > /usr/include/postgresql/9.5/server/c.h:299:18: warning: ISO C does not support �__int128� type [-pedantic] We're not going to do anything about this one; certainly we won't stop using int128 where it's available, and there isn't any other apparent way to suppress the warning. I doubt that -pedantic is a useful switch in practice, and this seems to be a particularly unhelpful bit of pedantry. Consider dropping that flag. > /usr/include/postgresql/9.5/server/port/atomics/generic.h: In function �pg_atomic_add_fetch_u32_impl�: > /usr/include/postgresql/9.5/server/port/atomics/generic.h:238:2: warning: conversion to �uint32� from �int32� may changethe sign of the result [-Wsign-conversion] According to the gcc manual, inserting explicit casts would silence these; is that worth doing? I doubt anyone cares about making all our code -Wconversion clean, but maybe making the headers clean would be worth the trouble. regards, tom lane
В списке pgsql-hackers по дате отправления: