D15764: [Custom-DefinesAndIncludes]: Objective-C++ support

René J.V. Bertin noreply at phabricator.kde.org
Wed Sep 26 16:18:07 BST 2018


rjvbb marked 4 inline comments as done.
rjvbb added a comment.


  > - Do we want a `-std=` flag, does Clang even accept that?
  
  Yes, clang accepts it, as long as you don't ask for an impossible combination (C or ObjC with std=c++11 for instance).
  
  I tried not adding the flag explicitly, but then it is added by `languageStandard()`.
  
  > - Should we just take the `ObjC` flags from the `C` flags, and `ObjC++` flags from the `C++` flags, or should they be set independently?
  
  I guess I haven't yet taken a clear decision on that? That had to do with trying not to add a standards definition which seemed like a good idea because I haven't found a clear statement about the C standard that ObjC 2.0 is based on. But that question is probably moot because from what I understand the ObjC standard just describes the superset. I came across a post stating that using Objective-C code in a C11 (C++11) file gives you ObjC11 (ObjC++11).

INLINE COMMENTS

> aaronpuchert wrote in gcclikecompiler.cpp:69
> Does ObjC++ not have a `-std=` flag?

Why do you ask, it's getting `-std=c++11` here (if no -std flag was given yet)?

> aaronpuchert wrote in settingsmanager.cpp:74-75
> Do you want to be able to define custom parser arguments? As above, are there multiple standards or language versions of ObjC++? I'd guess so if it is based on C++.

From what I've seen there are basically as many ObjC(++) standards as there are C(++) standards.

There are a few ObjC-specific compiler options (which are illegal for C/C++), for instance concerning ObjC exceptions. I'm not certain they change anything for the parser though (esp. not the parser in its current form).

So I'm tempted to say that for now we could and should simply use the C/C++ options for ObjC/ObjC++ and re-evaluate if and when the need for specific options arises.

> aaronpuchert wrote in parserwidget.cpp:61
> So here you say `c++11`.

Yes, but "there" too (if not I'm already in need of another vacation ^^)

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D15764

To: rjvbb, #kdevelop
Cc: aaronpuchert, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180926/04a80669/attachment-0001.html>


More information about the KDevelop-devel mailing list