GCC手册中提到的内容

GCC手册中提到的内容

本文介绍了什么是"C ++ ABI规范"? GCC手册中提到的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在查看C ++的GCC手册,发现以下引言:

I was looking at the GCC manual for C++, and I came across the following quote:

可以看出,以上段落引用了某种看似标准的C ++ ABI.据我了解,但是,不存在这样的ABI.这是什么意思呢?一个好的答案将给出尽可能详尽的解释.将"C ++ ABI规范"放入我首选的搜索引擎中并没有任何用处.

As can be seen, the above passage references some sort of seemingly standard C++ ABI. As I understand it, however, no such ABI exists. What is this passage talking about? A good answer will give as thorough an explanation as practical. Putting "C++ ABI specification" into my preferred search engine gives nothing useful.

推荐答案

我们可以从WG21提案中看到 N4028定义可移植的C ++ ABI gcc所指的是通用供应商ABI(Itanium C ++ ABI):

We can see from the WG21 proposal N4028 Defining a Portable C++ ABI what gcc is referring to is the Common Vendor ABI (Itanium C++ ABI):

  • 通用供应商ABI(Itanium C ++ ABI)是其中的一个步骤方向,以在某些平台上为该语言指定ABI. 今天,GCC和EDG等编译器均支持该功能.它没有为标准库指定ABI,因此这是必要的,但不足以例如在稳定的API边界上使用std::string
  • 同样,Microsoft VC ++长期以来一直具有稳定的语言,尽管没有记录,但该语言仍是ABI.它没有用于标准库的稳定的ABI,而是有意破坏每个主要发行版的ABI兼容性,例如,以便对实现进行持续改进,并快速实现包含ABI重大更改的新标准库.
  • ...
  • The Common Vendor ABI (Itanium C++ ABI) is a step in this direction, to specify an ABI for the language on some platforms. It is supported today by compilers such as GCC and EDG. It does not specify an ABI for the standard library, so this is necessary but insufficient to, for example, use std::string on a stable API boundary
  • Microsoft VC++ likewise has long had a de facto stable, though undocumented, ABI for the language. It does not have a stable ABI for the standard library, but rather intentionally breaks ABI compatibility on every major release, for example in order to allow continuous improvements to the implementation and to quickly implement a new standard library that contains ABI breaking changes.
  • ...

gcc还在其 ABI政策和准则中对此进行了介绍:

gcc also covers this in their ABI Policy and Guidelines:

这篇关于什么是"C ++ ABI规范"? GCC手册中提到的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 12:11