From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: [devel] I: g++ -Werror=return-type by default
Date: Mon, 11 Feb 2019 03:39:27 +0300
Message-ID: <20190211003926.GA14749@altlinux.org> (raw)
In-Reply-To: <20190209092433.GA6132@gyle.altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]
On Sat, Feb 09, 2019 at 09:24:33AM +0000, Girar Builder pender robot wrote:
> http://git.altlinux.org/tasks/archive/done/_215/221014/logs/events.1.3.log
>
> 2019-Feb-09 08:18:45 :: task #221014 for sisyphus started by ldv:
> #100 build 8.2.1-alt4 from /people/ldv/packages/gcc8.git fetched at 2019-Feb-08 10:31:28
[...]
> 2019-Feb-09 08:39:33 :: gcc8: closes bugs: 36038 36045
[...]
> 2019-Feb-09 09:24:15 :: updated /gears/g/gcc8.git branch `sisyphus'
> 2019-Feb-09 09:24:31 :: gears update OK
> 2019-Feb-09 09:24:31 :: task #221014 for sisyphus DONE
В этой сборке g++ (не gcc, только g++) по умолчанию включено
-Werror=return-type; это было сделано после того, как стало ясно,
что, начиная с версии 8, g++ при включённой оптимизации
в следующих двух случаях генерит код, практически непригодный
для выполнения:
1. no return statement in function returning non-void
2. control reaches end of non-void function
Согласно стандарту C++, компилятор при обработке такого кода праве делать
всё что угодно, и g++ теперь буквально не делает возврата из таких
функций.
Прежние версии g++ вели себя более гуманно, реализуя поведение,
свойственное компиляторам C: программы работали нормально, когда
не использовали возвращаемое значение таких функций.
Таким образом, при использовании g++ >= 8 все такие функции следует
исправить, либо меняя тип возвращаемого значения на void, либо реализуя
возвращение значения во всех случаях.
Я ожидаю, что исправлению подлежат около 80 пакетов, более точно можно
будет сказать по результатам тестовой пересборки.
Подробнее о проблеме см. https://bugzilla.altlinux.org/36038
--
ldv
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next parent reply other threads:[~2019-02-11 0:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 0:39 ` Dmitry V. Levin [this message]
2019-02-11 10:23 ` Dmitry V. Levin
2019-02-11 13:06 ` Антон Мидюков
2019-02-11 13:20 ` Sergey V Turchin
2019-02-11 13:29 ` Антон Мидюков
2019-02-11 14:00 ` Sergey V Turchin
2019-02-11 14:06 ` Антон Мидюков
2019-02-11 14:15 ` [devel] openscada qt-5.11 Sergey V Turchin
2019-02-11 15:36 ` Антон Мидюков
2019-02-11 16:40 ` Dmitry V. Levin
2019-02-11 16:56 ` Антон Мидюков
2019-02-18 7:12 ` Антон Мидюков
2019-02-18 7:38 ` Vladislav Zavjalov
2019-02-18 7:59 ` Vladislav Zavjalov
2019-02-18 8:09 ` Антон Мидюков
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=20190211003926.GA14749@altlinux.org \
--to=ldv@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