From: "Ivan A. Melnikov" <iv@altlinux.org>
To: devel@lists.altlinux.org
Subject: Re: [devel] -Werror приводит к ошибкам в системных хедерах
Date: Mon, 5 Jan 2009 15:33:05 +0300
Message-ID: <20090105153305.5534e49c@deimos> (raw)
In-Reply-To: <75e139a00901050136g5a99f6c8q134001b1217fe665@mail.gmail.com>
On Mon, 5 Jan 2009 15:36:54 +0600
"Slava Semushin" <slava.semushin@gmail.com> wrote:
> Здравствуйте!
>
> Собираю новую версию mpdscribble. Включил --enable-werror и получаю:
[...]
> /usr/include/libsoup-2.4/libsoup/soup-session-feature.h:21: error:
> struct has no members
Это из-за опций gcc -pedantic-errors и/или -pedantic...
>
> Решил обойти эту ошибку, включив только нужные программе хедеры вместо
> обобщающего soup.h
>
> Далее:
>
> In file included from /usr/include/sys/syslog.h:207,
> from /usr/include/syslog.h:1,
> from src/log.c:32:
> /usr/include/bits/syslog.h: In function 'syslog':
> /usr/include/bits/syslog.h:32: error: ISO C forbids 'return' with
> expression, in function returning void
> /usr/include/bits/syslog.h: In function 'vsyslog':
> /usr/include/bits/syslog.h:48: error: ISO C forbids 'return' with
> expression, in function returning void
> make[1]: *** [log.o] Ошибка 1
>
> А тут как быть?
>
Для меня это было сюрпризом, но действитедльно, в стандарте C99 пукт
6.8.6.4 параграф 1 запрещает return statement with an expression в
function whose return type is void. Опять же, gcc обращает на это
внимание только с -pedantic{,-errors}.
JFI, в c++98 (пункт 6.6.3 параграф 3) и последующих (правда, посленего
драфта C++0x у меня под рукой нет) такоe разрешено. ЕМНИП такое можно
было и в C89.
> Не хотелось бы отключать -Werror флаг, к тому же очень похоже, что у
> апстримного автора всё собирается и с ним, а вот у нас почему-то нет.
> СтОит ли вешать баги на эти хедеры или.. что делать вообщем?
>
Убирать -pedantic{,-errors}. Они ИМХО с -Werror не очень хорошо
сочетаются. Насчёт развешивания насекомых ничего не могу посоветовать.
> Спасибо за внимание.
>
Пожалуйста.
--
Best Regards,
Ivan A. Melnikov
next prev parent reply other threads:[~2009-01-05 12:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-05 9:36 Slava Semushin
2009-01-05 12:33 ` Ivan A. Melnikov [this message]
2009-01-05 12:50 ` Alexey I. Froloff
2009-01-05 13:24 ` Ivan A. Melnikov
2009-01-05 17:10 ` Dmitry V. Levin
2009-01-05 20:29 ` Slava Semushin
2009-01-05 21:41 ` Dmitry V. Levin
2009-03-09 8:40 ` Slava Semushin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090105153305.5534e49c@deimos \
--to=iv@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git