Demo for http://stackoverflow.com/q/16092520/827263
As you can see, g++ 4.7.2 reports the missing semicolon error in c.c
, not in foo.h
#include <iostream> | |
using namespace std; | |
int agenext (int age); | |
int main () | |
{ | |
int age = 42; | |
cout << "age = " << age << "\n"; | |
agenext(age); |
From nobody Mon Aug 26 10:42:03 2013 | |
X-Received: by 10.224.13.136 with SMTP id c8mr16375654qaa.0.1377533997489; | |
Mon, 26 Aug 2013 09:19:57 -0700 (PDT) | |
X-Received: by 10.50.80.78 with SMTP id p14mr380876igx.6.1377533997453; Mon, | |
26 Aug 2013 09:19:57 -0700 (PDT) | |
Path: eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!fx3no4866766qab.0!news-out.google.com!he10ni3708qab.0!nntp.google.com!fx3no4866762qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail | |
Newsgroups: comp.lang.c | |
Date: Mon, 26 Aug 2013 09:19:57 -0700 (PDT) | |
In-Reply-To: <[email protected]> | |
Complaints-To: [email protected] |
#include <stdio.h> | |
int main(void) { | |
FILE *f; | |
} |
Demo for http://stackoverflow.com/q/16092520/827263
As you can see, g++ 4.7.2 reports the missing semicolon error in c.c
, not in foo.h
From: Myth__Buster <[email protected]> | |
Subject: Re: Macro for setting MSB - Intended to work on both Little and Big-endian machines | |
Newsgroups: comp.lang.c | |
Date: Tue, 26 Mar 2013 11:07:21 -0700 (PDT) | |
On Tuesday, March 26, 2013 11:36:34 AM UTC-4, Keith Thompson wrote: | |
> Myth__Buster <[email protected]> writes: | |
> | |
> > *was at the LS-bit of LS-byte like on little-endian machine . . . | |
> |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
#define MAX 36 | |
#define URANDOM_DEVICE "/dev/urandom" | |
static FILE *urandom; | |
/* |
#include <stdio.h> | |
int main(void) { | |
char c[] = "abcd"; | |
c[0] = 'E'; | |
c[1] = 'F'; | |
c[2] = 'G'; | |
c[3] = 'H'; | |
puts(c); | |
return 0; | |
} |
http://stackoverflow.com/questions/13855582/gcc-outputs-very-large-executable-for-mersenne-program
This is a copy of a small C program that prints the largest(?) known Mersenne prime from http://bellard.org/mersenne.html. The file size is slightly larger than the 438 bytes mentioned on the web page, probably because of line breaks.
The original version generates a very large object file because of the large initialized static array.
with Ada.Text_IO; use Ada.Text_IO; | |
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; | |
procedure Foo is | |
Element_To_Ignore : Integer := 3; | |
type Array_Of_Integer is array(Positive Range <>) of Integer; | |
A : Array_Of_Integer := (5,3,2,6); | |
B : Array_Of_Integer | |
:= A(A'First .. Element_To_Ignore-1) & | |
A(Element_To_Ignore+1 .. A'Last); |