public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* can someone give me help on translating GNU C extensions to Chinese?
@ 2009-04-17 17:00 mildsim
  2009-04-17 21:22 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: mildsim @ 2009-04-17 17:00 UTC (permalink / raw)
  To: gcc-help

hi,I am a Chinese student,and I'm new here.
Recently,I am learning about linux kernel,and has came with a lot of problems.So I begin learning the extensions of GNU C.
Someone had already translated an old version of documents of GNU C extensions to Chinese.But as a pity,there are lots of mistakes,So I decided to translate the GNU C extensions of GCC 4.3.3.
Normally,I have met some problems that I can not solve.So I'd like to know if I can put the questions here? Or Can someone give me help for this translation?
I know that some questions must be easy to you,but when consider the language barrier,I even have no way to solve them.
 
Well,the first one is Slightly Looser Rules for Escaped Newlines
 
the follows are the detail:
/***************************************************************************************************************/

Recently, the preprocessor has relaxed its treatment of escaped newlines. Previously, the newline had to immediately follow a backslash. The current implementation allows whitespace in the form of spaces, horizontal and vertical tabs, and form feeds between the backslash and the subsequent newline. The preprocessor issues a warning, but treats it as a valid escaped newline and combines the two lines to form a single logical line. This works within comments and tokens, as well as between tokens. Comments are not treated as whitespace for the purposes of this relaxation, since they have not yet been replaced with spaces.

/****************************************************************************************************************/ 

 
can someone show me an easy example using this feature,such as a hello world example.And why develops this feature?
 
Thank you very much!
 
best regards!

 				
--------------
mildsim
2009-04-18

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: can someone give me help on translating GNU C extensions to Chinese?
  2009-04-17 17:00 can someone give me help on translating GNU C extensions to Chinese? mildsim
@ 2009-04-17 21:22 ` Ian Lance Taylor
  2009-04-18  3:33   ` mildsim
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2009-04-17 21:22 UTC (permalink / raw)
  To: mildsim; +Cc: gcc-help

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

"mildsim" <whcui1987@gmail.com> writes:

> /***************************************************************************************************************/
>
> Recently, the preprocessor has relaxed its treatment of escaped newlines. Previously, the newline had to immediately follow a backslash. The current implementation allows whitespace in the form of spaces, horizontal and vertical tabs, and form feeds between the backslash and the subsequent newline. The preprocessor issues a warning, but treats it as a valid escaped newline and combines the two lines to form a single logical line. This works within comments and tokens, as well as between tokens. Comments are not treated as whitespace for the purposes of this relaxation, since they have not yet been replaced with spaces.
>
> /****************************************************************************************************************/ 
>
>  
> can someone show me an easy example using this feature,such as a hello world example.And why develops this feature?

This refers to how the input file is handled by the preprocessor.  In
the input file, whitespace between a backslash and a newline is ignored.
For example, if you run the attached file through gcc -E, it will be
turned into "a b".

For some background on why this is done, see
http://gcc.gnu.org/ml/gcc/2000-05/msg01032.html and
http://gcc.gnu.org/PR8270 .

Ian



[-- Attachment #2: example --]
[-- Type: text/plain, Size: 21 bytes --]

#define A a \   
b
A

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: can someone give me help on translating GNU C extensions to Chinese?
  2009-04-17 21:22 ` Ian Lance Taylor
@ 2009-04-18  3:33   ` mildsim
  0 siblings, 0 replies; 3+ messages in thread
From: mildsim @ 2009-04-18  3:33 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

I'v got it!
thank you very much:)

------------------				 
mildsim
2009-04-18






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-18  3:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-17 17:00 can someone give me help on translating GNU C extensions to Chinese? mildsim
2009-04-17 21:22 ` Ian Lance Taylor
2009-04-18  3:33   ` mildsim

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).