Re: Boatload of warnings in CVS HEAD :-(

Поиск
Список
Период
Сортировка
От Zdenek Kotala
Тема Re: Boatload of warnings in CVS HEAD :-(
Дата
Msg-id 463B2497.20105@sun.com
обсуждение исходный текст
Ответ на Re: Boatload of warnings in CVS HEAD :-(  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Ответы Re: Boatload of warnings in CVS HEAD :-(  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Zdenek Kotala wrote:
> Tom Lane wrote:
>>
>> We can fix this for gcc by putting __attribute__((noreturn)) on the
>> declaration of pg_re_throw(), but what about other compilers?
>>
> 
> Sun studio also complains about it :(.
> 

I'm sorry it was to late for me, I recheck it again and Sun studio is
happy :-) and does not complaint about it, however there are a lot of
warning messages (not relevant with this issue). Most of them is about
following construct:

switch(..)
{
  case x :return(..);break;
...

Is the reason for keeping this in a code? Another kind of construct is:

#define PG_RETURN_NULL()  \    do { fcinfo->isnull = true; return (Datum) 0; } while (0)

It looks strange for me. Why it is used?

or

for(;;) { ... break;} see e.g
http://doxygen.postgresql.org/postgres_8c-source.html#l00198

or
why is there while ... break instead if?
http://doxygen.postgresql.org/comment_8c-source.html#l00221
    thanks for explanation        Zdenek



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Marko Kreen"
Дата:
Сообщение: Re: RETURN QUERY in PL/PgSQL?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Boatload of warnings in CVS HEAD :-(