* PROMOTE_PROTOTYPES nonstandard ?
@ 2002-07-24 11:38 Momchil Velikov
2002-07-24 12:16 ` Andreas Schwab
0 siblings, 1 reply; 2+ messages in thread
From: Momchil Velikov @ 2002-07-24 11:38 UTC (permalink / raw)
To: gcc
ISO/IEC 9899:1999 - 6.5.2.2 Function calls
[#7] If the expression that denotes the called function has
a type that does include a prototype, the arguments are
implicitly converted, as if by assignment, to the types of
the corresponding parameters, taking the type of each
parameter to be the unqualified version of its declared
type. The ellipsis notation in a function prototype
declarator causes argument type conversion to stop after the
last declared parameter. The default argument promotions
are performed on trailing arguments.
[#8] No other conversions are performed implicitly;
gccint.texi
`PROMOTE_PROTOTYPES'
A C expression whose value is nonzero if an argument declared in a
prototype as an integral type smaller than `int' should actually
be passed as an `int'.
Does that mean that targets, which #define PROMOTE_PROTOTYPES 1
(almost all) are non iso9899:1999 compliant ?
~velco
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PROMOTE_PROTOTYPES nonstandard ?
2002-07-24 11:38 PROMOTE_PROTOTYPES nonstandard ? Momchil Velikov
@ 2002-07-24 12:16 ` Andreas Schwab
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2002-07-24 12:16 UTC (permalink / raw)
To: Momchil Velikov; +Cc: gcc
Momchil Velikov <velco@fadata.bg> writes:
|> ISO/IEC 9899:1999 - 6.5.2.2 Function calls
|>
|> [#7] If the expression that denotes the called function has
|> a type that does include a prototype, the arguments are
|> implicitly converted, as if by assignment, to the types of
|> the corresponding parameters, taking the type of each
|> parameter to be the unqualified version of its declared
|> type. The ellipsis notation in a function prototype
|> declarator causes argument type conversion to stop after the
|> last declared parameter. The default argument promotions
|> are performed on trailing arguments.
|>
|> [#8] No other conversions are performed implicitly;
|>
|> gccint.texi
|> `PROMOTE_PROTOTYPES'
|> A C expression whose value is nonzero if an argument declared in a
|> prototype as an integral type smaller than `int' should actually
|> be passed as an `int'.
|>
|> Does that mean that targets, which #define PROMOTE_PROTOTYPES 1
|> (almost all) are non iso9899:1999 compliant ?
No, because strictly compliant code cannot tell the difference.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-07-24 12:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-24 11:38 PROMOTE_PROTOTYPES nonstandard ? Momchil Velikov
2002-07-24 12:16 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).