# PHP 5.5 and clang

- Thread: https://externals.io/message/66819
- Original archive: https://news-web.php.net/php.internals/66819
- Started by ondrej@sury.org on 2013-03-26T14:55:55+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #66819 — ondrej@sury.org — 2013-03-26T14:55:55+00:00

URL: https://externals.io/message/66819#66819

Hi,

I am trying to build PHP 5.5beta1 with clang, so the question is:

Would you be interested in the results? This would be one shot only.

The next step would be to do automatic builds and publishing results of
scan-build (a Clang static analysis tool). Would you be interested?

It does seem to produce lot of fatal errors on lot of places, so it seems
that php5 can be used to improve llvm/clang as well :).

O.
-- 
﻿Ondřej Surý <ondrej@sury.org

---

## #66820 — johannes@schlueters.de — 2013-03-26T15:11:15+00:00

URL: https://externals.io/message/66819#66820 · In reply to: #66819

> It does seem to produce lot of fatal errors on lot of places, so it seems
> that php5 can be used to improve llvm/clang as well :).

Recent clang versions work well for me with PHP. Earlier versions led to
infinite hanging compilers and such which gave me some doubt about
clang's state, while I like the way more helpful error messages clang
provides than other compilers I know.

I think it would be great if we could integrate scan-build and other
checks into http://ci.qa.php.net/ and would give more focus on that.

johannes

---

## #66839 — David Soria Parra — 2013-03-27T18:37:25+00:00

URL: https://externals.io/message/66819#66839 · In reply to: #66819

> --bcaec548a7f385895a04d8d51fce
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
>
> Hi,
>
> I am trying to build PHP 5.5beta1 with clang, so the question is:
>
> Would you be interested in the results? This would be one shot only.
>
Hi Ondrey,

yes I would be very interested in these results. I personally build PHP with
clang most of the time and think we should use it's features to provide
better analytics. Also I think since freebsd switched to clang ,we should
ensure that PHP can be compiled with clang.

Thank you very much for your work,
David

---

## #66840 — Ferenc Kovacs — 2013-03-27T19:06:25+00:00

URL: https://externals.io/message/66819#66840 · In reply to: #66819

> Hi,
>
> I am trying to build PHP 5.5beta1 with clang, so the question is:
>
> Would you be interested in the results? This would be one shot only.
>
> The next step would be to do automatic builds and publishing results of
> scan-build (a Clang static analysis tool). Would you be interested?
>
> It does seem to produce lot of fatal errors on lot of places, so it seems
> that php5 can be used to improve llvm/clang as well :).
>
> O.
> --
> ﻿Ondřej Surý <ondrej@sury.org>
>

for the record, Sebastian did this for 5.4, maybe it would be interesting
to you:
http://sebastian-bergmann.de/archives/916-Using-CLANGscan-build-for-Static-Analysis-of-the-PHP-Interpreter.html
see http://marc.info/?l=php-internals&m=132847183930339&w=1 for the
discussion about the results

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu
