[llvm-bugs] [Bug 40670] New: [RFE] implement -fpermissive support

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 8 14:36:06 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40670

            Bug ID: 40670
           Summary: [RFE] implement -fpermissive support
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: stsp at list.ru
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

#include <iostream>
#include <cstdlib>
class s {
public:
    int a;
    ~s() { std::cout << "a=" << a << std::endl; }
};
static s foo()
{
    return s{0};
}
int main()
{
    foo().a = 5;
    int *p = std::malloc(sizeof(int));
    return *p;
}
---

This code can be compiled with g++ if -fpermissive is used.
clang++ doesn't compile it with any options.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190208/b2ad9b1c/attachment.html>


More information about the llvm-bugs mailing list