https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119035

            Bug ID: 119035
           Summary: Problem of __attribute__ and maybe gcc 14 and 15
                    accepts invalid
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: qurong at ios dot ac.cn
  Target Milestone: ---

For this program:
```
int f4(int i) {
    __attribute__((assume(++i == 44)));
    return i;
}
int main() {
    int a = 7;
    int b = f4(a);
    return 0;
}
```


This causes an error in clang and msvc, but gcc 14 and 15 didn't report the
error. 

Compiler Explorer link: https://godbolt.org/z/d9dorqhd4

Reply via email to