This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/42944] [4.5 Regression] errno misoptimization due to __attribute__ ((__const__)) on __errno_location()



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-02-03 10:58 -------
The issue is simply that GCC thinks malloc does not set errno.  Removing
const from __errno_location is just papering over this issue.

But that malloc sets errno is really really unfortunate.  Because we have
no other way than clobbering global memory.  Note that C99 does not specify
malloc affecting errno.

Mine.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-02-03 10:58:09
               date|                            |
            Summary|errno misoptimization due to|[4.5 Regression] errno
                   |__attribute__ ((__const__)) |misoptimization due to
                   |on __errno_location()       |__attribute__ ((__const__))
                   |                            |on __errno_location()
   Target Milestone|---                         |4.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42944


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]