Description:
Discussion about C language standards.
|
|
|
What is use for "static void"
|
| |
Hi,
I get some C function. I do not understand why these functions are
defined as:
static void VitDec(int nl, struct pl_str *pl)
Could you explain it to me? Thanks.
|
|
void identifiers are primary expressions?
|
| |
Given this code:
extern void p1;
extern const void p2;
p1;
p2;
(void)p1;
(void)p2;
is a conforming implementation required to issue diagnositcs?
I'm not asking if a s.c. program can contain references to p1 or p2
in expressions; I know that it cannot because there is no way to... more »
|
|
condition true or false? -> (-1 < sizeof("test"))
|
| |
[Follow-ups set to comp.std.c in view of thread drift.]
...
A "shall" that defers to a compiler option seems a pretty weak
requirement.
...
The distinction isn't mine; it's C-as-it-stands, today. The
lone [1] is the diagnostic generated by #error, which (as of C99)
requires the compiler to reject the code. The [2] category covers... more »
|
|
Clarification on _Pragma "operator"
|
| |
N1570 6.10.9p1 says:
A unary operator expression of the form:
_Pragma ( string-literal )
is processed as follows:
[explanation deleted]
This was added in C99. The C99 Rationale says:
As an alternative syntax for a #pragma directive, the _Pragma
operator has the advantage that it can be used in a macro... more »
|
|
Excuse me. Here is it again (re: inline)
|
| |
I had a typo in my first message, and I wasn't very explicit
about what is the problem.
I apologize for this, probably I am too tired.
------------------------------ -------------------
What I need to do is the following:
This is an interface:
typedef struct interface {
double (const *Deg2Rad)(double foo);... more »
|
|
inline
|
| |
It is impossible to declare inline a member of a function table:
struct Interface = {
inline int (*pFn)(double);
inline int (*pFn1)(char *);
...
Is there any way to convey the information to the compiler???
Are there any plans to fill this hole in the language?
Thanks
|
|
nonsense in TR24731, §6.5.3.1
|
| |
TR24731, §5.6.3.1 brings a code sample that says { printf (argv); }, observes that it may leak information and concludes that printf is wrong and it must be fixed. How does the introduction of printf_s fix this particular case?
Further it examines the risks behind %n and argues that it can be used to... more »
|
|
main function without a return statement in C99/C11
|
| |
Concerning non-void functions without a return statement, the
C99 standard says (and it seems that C11 is identical):
5.1.2.2 Hosted environment
5.1.2.2.3 Program termination
1 If the return type of the main function is a type compatible
with int, a return from the initial call to the main function... more »
|
|
|