<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>35482</bug_id>
          
          <creation_ts>2018-10-07 06:16:50 +0300</creation_ts>
          <short_desc>make some more dangerous warnings errors by default</short_desc>
          <delta_ts>2018-11-26 15:37:57 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>gcc8</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Gleb F-Malinovskiy">glebfm</assigned_to>
          <cc>glebfm</cc>
    
    <cc>iv</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>174790</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2018-10-07 06:16:50 +0300</bug_when>
    <thetext>Some warnings concerning pointers mean that a dangerous thing can happen (the pointer value can be corrupted), and this will be difficult to debug and to reproduce.

The first of such warnings is:

* &quot;implicit declaration of function&quot; (example: https://bugzilla.altlinux.org/show_bug.cgi?id=34977#c0 )

I suggest to make this warning an error by default.

There are some other dangerous warning (though, sometimes this code is intentional). A second such warning is:

* &quot;cast from pointer to integer of different size&quot; (example: http://git.altlinux.org/tasks/archive/done/_209/214230/build/100/x86_64/log ; this case actually needs to be fixed by casting to an int type that has the same size as a pointer, e.g. &quot;intptr_t&quot; or OCaml specific &quot;value&quot;, which is defined according to the same idea)

It is rarely something that people actually want. Perhaps, this warning could also be made an error by default.

As for a third warning, it is not so dangerous, and such code can be error-free more often than the other warnings:

* &quot;passing argument ... from incompatible pointer type&quot; (example: https://bugzilla.altlinux.org/show_bug.cgi?id=34977#c0 ; there, it works correctly, although the compiler doesn&apos;t know this; it could be corrected with an explicit cast, although that might be too much work)

As for the third warning, I&apos;m not so sure that it should be made an error by default.

Perhaps, there are more dangerous warnings which I couldn&apos;t remember now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>