The following code in 3.4.0 and above does not warn/error our about assignment 
of read only location:
static inline void sigaddset(const int set, int i)
{
        __asm__("" : "=r"(set) );
}

THis is just like 21419 but this time a "static inline" function instead.

-- 
           Summary: [3.4/4.0/4.1 Regression]
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to