Git Product home page Git Product logo

Comments (2)

nenadv avatar nenadv commented on August 30, 2024

It does make sense to drop GCC_UPC from the Clang UPC.

I would also add CLANG_UPC but it was pointed to me that both CLANG_UPC and GCC_UPC are probably not be needed. Definitions of GNUC and UPC has the same meaning as GCC_UPC, and clang can differentiate between GUCP and Clang UPC.

from clang-upc.

PHHargrove avatar PHHargrove commented on August 30, 2024

I would also add CLANG_UPC but it was pointed to me that both CLANG_UPC and GCC_UPC are probably not be needed.

I disagree since the Berkeley translator can (and will) define __UPC__ and one or both of __GNUC__ and __clang__. That means __UPC__ && __clang__ is ambiguous (could be BUPC or clang-upc[2c]), and __UPC__ && __GNUC__ can be true for any of the three current translator/compiler choice supported by the upcc driver.

Summary, from the point of view of the guy maintaining UPCR, the test harness and the upcc driver:

  • Berkeley translator defines __UPC__ and __BERKELEY_UPC__, maybe defines __GNUC__ and/or __clang__
  • GUPC defines __UPC__, __GUPC__, and __GCC_UPC__
  • Clang-upc2c defines __UPC__ and __clang__, maybe defines __GNUC__

The main complication is that depending on the backend compiler in use the Berkeley and upc2c translator cases may define __GNUC__ and the Berkeley translator might also define __clang__

So, the "canonical" ID formulae if one removes __GCC_UPC__ but does not add __CLANG_UPC__:

  • Berkeley: #if defined(__BERKELEY_UPC__)
  • GUPC: #if defined(_GCC_UPC__)
  • clang-upc[2c]: #if defined(__UPC__) && defined(__clang__) && !defined(__BERKELEY_UPC__)

I am OK with needing defined(__UPC__) && defined(__clang__) to distinguish clang-upc2c, but really dislike the need for && !defined(__BERKELEY_UPC__) to avoid confusion in the case of BUPC with CC=clang. On this basis, I would still like to see a definition of __CLANG_UPC__. However, I am fully prepared to add -D__CLANG_UPC__=1 within the upcc driver if you guys would rather not make it predefined within clang-upc[2c]. Just say so and I'll use that approach and drop my request to see it predefined by clang-upc.

from clang-upc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.