Модераторы: Daevaorn
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> GCC 4.0, вышел :) 
:(
    Опции темы
chipset
Дата 24.4.2005, 17:09 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Экс. модератор
Сообщений: 4071
Регистрация: 11.1.2003
Где: Seattle, US

Репутация: 27
Всего: 165



Вышел новый релиз GCC, версия 4.0, качаем отсюда.
Полный список изменений тут, а я приведу изменения касающиеся непосредственно C++:
Цитата


C++

    * When compiling without optimizations (-O0), the C++ frontend is much faster than in any previous versions of GCC. Independent testers have measured speed-ups up to 25% in real-world production code, compared to the 3.4 family (which was already the fastest version to date). Upgrading from older versions might show even bigger improvements.

    * ELF visibility attributes can now be applied to a class type, so that it affects every member function of a class at once, without having to specify each individually:

class __attribute__ ((visibility("hidden"))) Foo
{
  int foo1();
  void foo2();
};

      The syntax is deliberately similar to the __declspec() system used by Microsoft Windows based compilers, allowing cross-platform projects to easily reuse their existing macro system for denoting exports and imports. By explicitly marking internal classes never used outside a binary as hidden, one can completely avoid PLT indirection overheads during their usage by the compiler. You can find out more about the advantages of this at http://people.redhat.com/drepper/dsohowto.pdf

    * The -fvisibility-inlines-hidden option has been added which marks all inlineable functions as having hidden ELF visibility, thus removing their symbol and typeinfo from the exported symbol table of the output ELF binary. Using this option can reduce the exported symbol count of template-heavy code by up to 40% with no code change at all, thus notably improving link and load times for the binary as well as a reduction in size of up to 10%. Also, check the new -fvisibility option.

    * The compiler now uses the library interface specified by the C++ ABI for thread-safe initialization of function-scope static variables. Most users should leave this alone, but embedded programmers may want to disable this by specifying -fno-threadsafe-statics for a small savings in code size.

    * Taking the address of an explicit register variable is no longer supported. Note that C++ allows taking the address of variables with register storage so this will continue to compile with a warning. For example, assuming that r0 is a machine register:

register int foo asm ("r0");
register int bar;
&foo; // error, no longer accepted
&bar; // OK, with a warning

    * G++ has an undocumented extension to virtual function covariancy rules that allowed the overrider to return a type that was implicitly convertable to the overridden function's return type. For instance a function returning void * could be overridden by a function returning T *. This is now deprecated and will be removed in a future release.

    * The G++ minimum and maximum operators (<? and >?) and their compound forms (<?=) and >?=) have been deprecated and will be removed in a future version. Code using these operators should be modified to use std::min and std::max instead

    * Declaration of nested classes of class templates as friends are supported:

template <typename T> struct A {
  class B {};
};
class C {
  template <typename T> friend class A<T>::B;
};

      This complements the feature member functions of class templates as friends introduced in GCC 3.4.0.

    * When declaring a friend class using an unqualified name, classes outside the innermost non-class scope are not searched:

class A;
namespace N {
  class B {
    friend class A;  // Refer to N::A which has not been declared yet
                      // because name outside namespace N are not searched
    friend class ::A; // Refer to ::A
  };
}

      Hiding the friend name until declaration is still not implemented.
    * Friends of classes defined outside their namespace are correctly handled:

namespace N {
  class A;
}
class N::A {
  friend class B; // Refer to N::B in GCC 4.0.0
                  // but ::B in earlier versions of GCC
};






--------------------
Цитата(Jimi Hendrix)
Well, I stand up next to a mountain
And I chop it down with the edge of my hand
PM MAIL WWW   Вверх
Ni@m
Дата 25.4.2005, 13:36 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Бывалый
*


Профиль
Группа: Участник
Сообщений: 189
Регистрация: 11.3.2004
Где: почти Киев

Репутация: 0
Всего: 6



Вот блин, а я поспешил и вчера всю систему компилил под 3.4.3.
Я думал они позже его выпустят.
А реально есть выигрыш?

--------------------
Обучение - как переливание воды из одной чашки в другую: всегда лучше, чтоб чашка со знаниями нахордилась выше.
PM MAIL WWW ICQ   Вверх
chipset
Дата 25.4.2005, 16:48 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Экс. модератор
Сообщений: 4071
Регистрация: 11.1.2003
Где: Seattle, US

Репутация: 27
Всего: 165



Ну вроде бы оптимизатор улучшили, хотя как реально это скажется я не знаю - надо тестить.


--------------------
Цитата(Jimi Hendrix)
Well, I stand up next to a mountain
And I chop it down with the edge of my hand
PM MAIL WWW   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "С++:Общие вопросы"
Earnest Daevaorn

Добро пожаловать!

  • Черновик стандарта C++ (за октябрь 2005) можно скачать с этого сайта. Прямая ссылка на файл черновика(4.4мб).
  • Черновик стандарта C (за сентябрь 2005) можно скачать с этого сайта. Прямая ссылка на файл черновика (3.4мб).
  • Прежде чем задать вопрос, прочтите это и/или это!
  • Здесь хранится весь мировой запас ссылок на документы, связанные с C++ :)
  • Не брезгуйте пользоваться тегами [code=cpp][/code].
  • Пожалуйста, не просите написать за вас программы в этом разделе - для этого существует "Центр Помощи".
  • C++ FAQ

Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Earnest Daevaorn

 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | C/C++: Общие вопросы | Следующая тема »


 




[ Время генерации скрипта: 0.0444 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.