Главная » Просмотр файлов » Стандарт языка Си С99 TC

Стандарт языка Си С99 TC (1113411), страница 82

Файл №1113411 Стандарт языка Си С99 TC (Стандарт языка Си С99 + TC) 82 страницаСтандарт языка Си С99 TC (1113411) страница 822019-04-24СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 82)

An implementation can provide an alternative of notificationthrough termination with a ‘‘hard-to-ignore’’ message (see LIA−1 subclause 6.1.3).2LIA−1 does not require that traps be precise.3C does require that SIGFPE be the signal corresponding to arithmetic exceptions, if thereis any signal raised for them.4C supports signal handlers for SIGFPE and allows trapping of arithmetic exceptions.When arithmetic exceptions do trap, C’s signal-handler mechanism allows trap-andterminate (either default implementation behavior or user replacement for it) or trap-andresume, at the programmer’s option.486Language independent arithmetic§H.3.1.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3Annex I(informative)Common warnings1An implementation may generate warnings in many situations, none of which arespecified as part of this International Standard.

The following are a few of the morecommon situations.2— A new struct or union type appears in a function prototype (6.2.1, 6.7.2.3).— A block with initialization of an object that has automatic storage duration is jumpedinto (6.2.4).— An implicit narrowing conversion is encountered, such as the assignment of a longint or a double to an int, or a pointer to void to a pointer to any type other thana character type (6.3).— A hexadecimal floating constant cannot be represented exactly in its evaluation format(6.4.4.2).— An integer character constant includes more than one character or a wide characterconstant includes more than one multibyte character (6.4.4.4).— The characters /* are found in a comment (6.4.7).— An ‘‘unordered’’ binary operator (not comma, &&, or ||) contains a side effect to anlvalue in one operand, and a side effect to, or an access to the value of, the identicallvalue in the other operand (6.5).— A function is called but no prototype has been supplied (6.5.2.2).— The arguments in a function call do not agree in number and type with those of theparameters in a function definition that is not a prototype (6.5.2.2).— An object is defined but not used (6.7).— A value is given to an object of an enumerated type other than by assignment of anenumeration constant that is a member of that type, or an enumeration object that hasthe same type, or the value of a function that returns the same enumerated type(6.7.2.2).— An aggregate has a partly bracketed initialization (6.7.7).— A statement cannot be reached (6.8).— A statement with no apparent effect is encountered (6.8).— A constant expression is used as the controlling expression of a selection statement(6.8.4).§ICommon warnings487ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256— An incorrectly formed preprocessing group is encountered while skipping apreprocessing group (6.10.1).— An unrecognized #pragma directive is encountered (6.10.6).488Common warnings§IWG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3Annex J(informative)Portability issues1This annex collects some information about portability that appears in this InternationalStandard.J.1 Unspecified behavior1The following are unspecified:— The manner and timing of static initialization (5.1.2).— The termination status returned to the hosted environment if the return type of mainis not compatible with int (5.1.2.2.3).— The behavior of the display device if a printing character is written when the activeposition is at the final position of a line (5.2.2).— The behavior of the display device if a backspace character is written when the activeposition is at the initial position of a line (5.2.2).— The behavior of the display device if a horizontal tab character is written when theactive position is at or past the last defined horizontal tabulation position (5.2.2).— The behavior of the display device if a vertical tab character is written when the activeposition is at or past the last defined vertical tabulation position (5.2.2).— How an extended source character that does not correspond to a universal charactername counts toward the significant initial characters in an external identifier (5.2.4.1).— Many aspects of the representations of types (6.2.6).— The value of padding bytes when storing values in structures or unions (6.2.6.1).— The value of a union member other than the last one stored into (6.2.6.1).— The representation used when storing a value in an object that has more than oneobject representation for that value (6.2.6.1).— The values of any padding bits in integer representations (6.2.6.2).— Whether certain operators can generate negative zeros and whether a negative zerobecomes a normal zero when stored in an object (6.2.6.2).— Whether two string literals result in distinct arrays (6.4.5).— The order in which subexpressions are evaluated and the order in which side effectstake place, except as specified for the function-call (), &&, ||, ?:, and commaoperators (6.5).§J.1Portability issues489ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256— The order in which the function designator, arguments, and subexpressions within thearguments are evaluated in a function call (6.5.2.2).— The order of side effects among compound literal initialization list expressions(6.5.2.5).— The order in which the operands of an assignment operator are evaluated (6.5.16).— The alignment of the addressable storage unit allocated to hold a bit-field (6.7.2.1).— Whether a call to an inline function uses the inline definition or the external definitionof the function (6.7.4).— Whether or not a size expression is evaluated when it is part of the operand of asizeof operator and changing the value of the size expression would not affect theresult of the operator (6.7.5.2).— The order in which any side effects occur among the initialization list expressions inan initializer (6.7.8).— The layout of storage for function parameters (6.9.1).— When a fully expanded macro replacement list contains a function-like macro nameas its last preprocessing token and the next preprocessing token from the source file isa (, and the fully expanded replacement of that macro ends with the name of the firstmacro and the next preprocessing token from the source file is again a (, whether thatis considered a nested replacement (6.10.3).— The order in which # and ## operations are evaluated during macro substitution(6.10.3.2, 6.10.3.3).— Whether errno is a macro or an identifier with external linkage (7.5).— The state of the floating-point status flags when execution passes from a part of theprogram translated with FENV_ACCESS ‘‘off’’ to a part translated withFENV_ACCESS ‘‘on’’ (7.6.1).— The order in which feraiseexcept raises floating-point exceptions, except asstated in F.7.6 (7.6.2.3).— Whether math_errhandling is a macro or an identifier with external linkage(7.12).— The results of the frexp functions when the specified value is not a floating-pointnumber (7.12.6.4).— The numeric result of the ilogb functions when the correct value is outside therange of the return type (7.12.6.5, F.9.3.5).— The result of rounding when the value is out of range (7.12.9.5, 7.12.9.7, F.9.6.5).490Portability issues§J.1WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3— The value stored by the remquo functions in the object pointed to by quo when y iszero (7.12.10.3).— Whether setjmp is a macro or an identifier with external linkage (7.13).— Whether va_copy and va_end are macros or identifiers with external linkage(7.15.1).— The hexadecimal digit before the decimal point when a non-normalized floating-pointnumber is printed with an a or A conversion specifier (7.19.6.1, 7.24.2.1).— The value of the file position indicator after a successful call to the ungetc functionfor a text stream, or the ungetwc function for any stream, until all pushed-backcharacters are read or discarded (7.19.7.11, 7.24.3.10).— The details of the value stored by the fgetpos function (7.19.9.1).— The details of the value returned by the ftell function for a text stream (7.19.9.4).— Whether the strtod, strtof, strtold, wcstod, wcstof, and wcstoldfunctions convert a minus-signed sequence to a negative number directly or bynegating the value resulting from converting the corresponding unsigned sequence(7.20.1.3, 7.24.4.1.1).— The order and contiguity of storage allocated by successive calls to the calloc,malloc, and realloc functions (7.20.3).— The amount of storage allocated by a successful call to the calloc, malloc, orrealloc function when 0 bytes was requested (7.20.3).— Which of two elements that compare as equal is matched by the bsearch function(7.20.5.1).— The order of two elements that compare as equal in an array sorted by the qsortfunction (7.20.5.2).— The encoding of the calendar time returned by the time function (7.23.2.4).— The characters stored by the strftime or wcsftime function if any of the timevalues being converted is outside the normal range (7.23.3.5, 7.24.5.1).— The conversion state after an encoding error occurs (7.24.6.3.2, 7.24.6.3.3, 7.24.6.4.1,7.24.6.4.2,— The resulting value when the ‘‘invalid’’ floating-point exception is raised duringIEC 60559 floating to integer conversion (F.4).— Whether conversion of non-integer IEC 60559 floating values to integer raises the‘‘inexact’’ floating-point exception (F.4).§J.1Portability issues491ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256— Whether or when library functions in <math.h> raise the ‘‘inexact’’ floating-pointexception in an IEC 60559 conformant implementation (F.9).— Whether or when library functions in <math.h> raise an undeserved ‘‘underflow’’floating-point exception in an IEC 60559 conformant implementation (F.9).— The exponent value stored by frexp for a NaN or infinity (F.9.3.4).— The numeric result returned by the lrint, llrint, lround, and llroundfunctions if the rounded value is outside the range of the return type (F.9.6.5, F.9.6.7).— The sign of one part of the complex result of several math functions for certainexceptional values in IEC 60559 compatible implementations (G.6.1.1, G.6.2.2,G.6.2.3, G.6.2.4, G.6.2.5, G.6.2.6, G.6.3.1, G.6.4.2).J.2 Undefined behavior1The behavior is undefined in the following circumstances:— A ‘‘shall’’ or ‘‘shall not’’ requirement that appears outside of a constraint is violated(clause 4).— A nonempty source file does not end in a new-line character which is not immediatelypreceded by a backslash character or ends in a partial preprocessing token orcomment (5.1.1.2).— Token concatenation produces a character sequence matching the syntax of auniversal character name (5.1.1.2).— A program in a hosted environment does not define a function named main using oneof the specified forms (5.1.2.2.1).— A character not in the basic source character set is encountered in a source file, exceptin an identifier, a character constant, a string literal, a header name, a comment, or apreprocessing token that is never converted to a token (5.2.1).— An identifier, comment, string literal, character constant, or header name contains aninvalid multibyte character or does not begin and end in the initial shift state (5.2.1.2).— The same identifier has both internal and external linkage in the same translation unit(6.2.2).— An object is referred to outside of its lifetime (6.2.4).— The value of a pointer to an object whose lifetime has ended is used (6.2.4).— The value of an object with automatic storage duration is used while it isindeterminate (6.2.4, 6.7.8, 6.8).— A trap representation is read by an lvalue expression that does not have character type(6.2.6.1).492Portability issues§J.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3— A trap representation is produced by a side effect that modifies any part of the objectusing an lvalue expression that does not have character type (6.2.6.1).— The arguments to certain operators are such that could produce a negative zero result,but the implementation does not support negative zeros (6.2.6.2).— Two declarations of the same object or function specify types that are not compatible(6.2.7).— Conversion to or from an integer type produces a value outside the range that can berepresented (6.3.1.4).— Demotion of one real floating type to another produces a value outside the range thatcan be represented (6.3.1.5).— An lvalue does not designate an object when evaluated (6.3.2.1).— A non-array lvalue with an incomplete type is used in a context that requires the valueof the designated object (6.3.2.1).— An lvalue having array type is converted to a pointer to the initial element of thearray, and the array object has register storage class (6.3.2.1).— An attempt is made to use the value of a void expression, or an implicit or explicitconversion (except to void) is applied to a void expression (6.3.2.2).— Conversion of a pointer to an integer type produces a value outside the range that canbe represented (6.3.2.3).— Conversion between two pointer types produces a result that is incorrectly aligned(6.3.2.3).— A pointer is used to call a function whose type is not compatible with the pointed-totype (6.3.2.3).— An unmatched ' or " character is encountered on a logical source line duringtokenization (6.4).— A reserved keyword token is used in translation phase 7 or 8 for some purpose otherthan as a keyword (6.4.1).— A universal character name in an identifier does not designate a character whoseencoding falls into one of the specified ranges (6.4.2.1).— The initial character of an identifier is a universal character name designating a digit(6.4.2.1).— Two identifiers differ only in nonsignificant characters (6.4.2.1).— The identifier _ _func_ _ is explicitly declared (6.4.2.2).§J.2Portability issues493ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256— The program attempts to modify a string literal (6.4.5).— The characters ', \, ", //, or /* occur in the sequence between the < and >delimiters, or the characters ', \, //, or /* occur in the sequence between the "delimiters, in a header name preprocessing token (6.4.7).— Between two sequence points, an object is modified more than once, or is modifiedand the prior value is read other than to determine the value to be stored (6.5).— An exceptional condition occurs during the evaluation of an expression (6.5).— An object has its stored value accessed other than by an lvalue of an allowable type(6.5).— An attempt is made to modify the result of a function call, a conditional operator, anassignment operator, or a comma operator, or to access it after the next sequencepoint (6.5.2.2, 6.5.15, 6.5.16, 6.5.17).— For a call to a function without a function prototype in scope, the number ofarguments does not equal the number of parameters (6.5.2.2).— For call to a function without a function prototype in scope where the function isdefined with a function prototype, either the prototype ends with an ellipsis or thetypes of the arguments after promotion are not compatible with the types of theparameters (6.5.2.2).— For a call to a function without a function prototype in scope where the function is notdefined with a function prototype, the types of the arguments after promotion are notcompatible with those of the parameters after promotion (with certain exceptions)(6.5.2.2).— A function is defined with a type that is not compatible with the type (of theexpression) pointed to by the expression that denotes the called function (6.5.2.2).— The operand of the unary * operator has an invalid value (6.5.3.2).— A pointer is converted to other than an integer or pointer type (6.5.4).— The value of the second operand of the / or % operator is zero (6.5.5).— Addition or subtraction of a pointer into, or just beyond, an array object and aninteger type produces a result that does not point into, or just beyond, the same arrayobject (6.5.6).— Addition or subtraction of a pointer into, or just beyond, an array object and aninteger type produces a result that points just beyond the array object and is used asthe operand of a unary * operator that is evaluated (6.5.6).— Pointers that do not point into, or just beyond, the same array object are subtracted(6.5.6).494Portability issues§J.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3— An array subscript is out of range, even if an object is apparently accessible with thegiven subscript (as in the lvalue expression a[1][7] given the declaration inta[4][5]) (6.5.6).— The result of subtracting two pointers is not representable in an object of typeptrdiff_t (6.5.6).— An expression is shifted by a negative number or by an amount greater than or equalto the width of the promoted expression (6.5.7).— An expression having signed promoted type is left-shifted and either the value of theexpression is negative or the result of shifting would be not be representable in thepromoted type (6.5.7).— Pointers that do not point to the same aggregate or union (nor just beyond the samearray object) are compared using relational operators (6.5.8).— An object is assigned to an inexactly overlapping object or to an exactly overlappingobject with incompatible type (6.5.16.1).— An expression that is required to be an integer constant expression does not have aninteger type; has operands that are not integer constants, enumeration constants,character constants, sizeof expressions whose results are integer constants, orimmediately-cast floating constants; or contains casts (outside operands to sizeofoperators) other than conversions of arithmetic types to integer types (6.6).— A constant expression in an initializer is not, or does not evaluate to, one of thefollowing: an arithmetic constant expression, a null pointer constant, an addressconstant, or an address constant for an object type plus or minus an integer constantexpression (6.6).— An arithmetic constant expression does not have arithmetic type; has operands thatare not integer constants, floating constants, enumeration constants, characterconstants, or sizeof expressions; or contains casts (outside operands to sizeofoperators) other than conversions of arithmetic types to arithmetic types (6.6).— The value of an object is accessed by an array-subscript [], member-access .

Характеристики

Тип файла
PDF-файл
Размер
3,61 Mb
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Зачем заказывать выполнение своего задания, если оно уже было выполнено много много раз? Его можно просто купить или даже скачать бесплатно на СтудИзбе. Найдите нужный учебный материал у нас!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6384
Авторов
на СтудИзбе
308
Средний доход
с одного платного файла
Обучение Подробнее