[cfe-dev] language, standard conformance test

Laszlo Nagy rizsotto.mailinglist at gmail.com
Fri Mar 6 07:40:58 PST 2015


hi Mehmet,

thanks for your message. you might be right, but i have other experiences.
let me give you a few examples...

according to linux man pages, the system call 'clock_gettime' is
POSIX.1-2001 conform. and it is available on Linux or FreeBSD, but it is
not there on OSX... or 'asprintf' is a GNU extension, not in C or POSIX
standards, but it is available on Linux, FreeBSD or OSX... some other GNU
extension are implemented only in GNU libc, therefore available only on
Linux.

so, as far as i see that standard conformity is depends on the OS libc
rather than the compiler. so, i thought a tool can forecast these
incompatibilities and can reason about it... but you are right, C standard
compatibilities can be caught on a single platform already. maybe it is a
bad idea, that's why nobody had made it. ;) thanks for your feedback!

regards,
Laszlo

On Fri, Mar 6, 2015 at 9:28 AM, Mehmet Erol Sanliturk <
m.e.sanliturk at gmail.com> wrote:

>
>
> On Thu, Mar 5, 2015 at 7:25 PM, Laszlo Nagy <
> rizsotto.mailinglist at gmail.com> wrote:
>
>> hi there,
>>
>> i am wondering that, is there such a tool which does language (or
>> standard) conformance checking?
>>
>> a tool which takes the source code of a project (and a compilation
>> database) and report that the source code shall be compiled at least with
>> compiler which can do for example, C99 and on an OS which does support
>> POSIX.1-2001. or a more detailed report which says these function calls
>> (source location provided) are require this level of standard conformance,
>> and those are available on these platforms. or this and this function calls
>> are obsolete in standard X and use some other call instead.
>>
>> these kind of informations are there in the man pages, but have to check
>> manually. and my endeavour in multi OS, portable C/C++ code was always with
>> surprises. and a tool like this would have been useful for me in the past.
>>
>> i am interested that tool is exists or not? or somebody planing to
>> implement such? or any opinion why this kind of tool is not useful, and
>> testing on real OS will be the ultimate solution every time, and that can't
>> be avoided. so, any thoughts are welcome! ;)
>>
>> regards,
>> Laszlo
>>
>> _______________________________________________
>>
>
>
>
> Assume , in different operating systems , there is the same compiler , for
> example , Clang 3.5.1 .
>
> Is compiling with , for example , -sdt=C99 , in one operating system , not
> sufficient for detecting incompatibilities with standard C99 ?
>
>
> Thank you very much .
>
>
> Mehmet Erol Sanliturk
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150306/bf0c0087/attachment.html>


More information about the cfe-dev mailing list