Re: Enforcing C++ compatibility with C code in CI/CD

2023-10-09 Thread Daniel Appiagyei
No rush at all, thanks On Mon, Oct 9, 2023 at 8:23 PM Xiang Xiao wrote: > Let' me find some time to write a test, please wait for a moment. > > On Tue, Oct 10, 2023 at 2:53 AM Daniel Appiagyei > wrote: > > > Good solution. > > I'm not too knowledgeable about makefiles, but if you could set that

Re: Enforcing C++ compatibility with C code in CI/CD

2023-10-09 Thread Xiang Xiao
Let' me find some time to write a test, please wait for a moment. On Tue, Oct 10, 2023 at 2:53 AM Daniel Appiagyei wrote: > Good solution. > I'm not too knowledgeable about makefiles, but if you could set that part > up then I can do the work to make the files compatible? > > On Sun, Oct 8, 2023

Re: Enforcing C++ compatibility with C code in CI/CD

2023-10-09 Thread Daniel Appiagyei
Good solution. I'm not too knowledgeable about makefiles, but if you could set that part up then I can do the work to make the files compatible? On Sun, Oct 8, 2023 at 10:44 PM Xiang Xiao wrote: > We can add a simple test like this: > >1. Create a context target in Makefile to generate a .cx

Re: Enforcing C++ compatibility with C code in CI/CD

2023-10-08 Thread Xiang Xiao
We can add a simple test like this: 1. Create a context target in Makefile to generate a .cxx file which list and include all header files in nuttx/include 2. Add the generated file to CXXSRCS If we just want to ensure the public nuttx header files are compatible with c++ syntax. On Mon

Re: Enforcing C++ compatibility with C code in CI/CD

2023-10-08 Thread Daniel Appiagyei
Late follow up, sorry Thanks guys, I do understand that only headers need to be compatible, however, the GCC check I mentioned above does not discriminate between headers and source files. If we don't have some sort of automated check for C++ compatibility, then we will run into issues in the futu

Re: Enforcing C++ compatibility with C code in CI/CD

2023-09-17 Thread Petro Karashchenko
Since C++ most likely will never be used in the kernel I see that compatibility border should stay in the "include" folder in nuttx repo. The nuttx-apps headers should be C++ compatible as we can mix things at application level.

Re: Enforcing C++ compatibility with C code in CI/CD

2023-09-16 Thread Xiang Xiao
I think at least the c header file should be compatible with c++ compiler, but the c source file could use sme incompatible language features. On Sat, Sep 16, 2023 at 8:47 AM Daniel Appiagyei wrote: > Hi, > I'm following up on an issue >

Enforcing C++ compatibility with C code in CI/CD

2023-09-15 Thread Daniel Appiagyei
Hi, I'm following up on an issue I opened about a C header file not being compatible with a C++ compiler because of it using reserved C++ keywords. I'm fixing this issue for header files but wanted to know if we want to endorse