Hi, I have a problem with sources that used to compile with previous versions of gcc: char[] = " Its a sample Of compiling a Char array"; It used to compile with previous version, now it complains with "no matching " ending found"(something like that). I managed to edit the source and changed to: char[] = "its a sample" "of compiling a" "char array"; This time, the compiler did not complain, but I don't know if it is the answer, and I can't modify lots of old source code. Is there any switch to pass the compiler so it recognizes this old behavior, and I can compile old code? Thanks in advance for any help...
On Monday 26 May 2003 22:01, Gustavo Dutra wrote:
Hi,
I have a problem with sources that used to compile with previous versions of gcc:
char[] = " Its a sample Of compiling a Char array";
It used to compile with previous version, now it complains with "no matching " ending found"(something like that).
I managed to edit the source and changed to:
char[] = "its a sample" "of compiling a" "char array";
This time, the compiler did not complain, but I don't know if it is the answer, and I can't modify lots of old source code.
Is there any switch to pass the compiler so it recognizes this old behavior, and I can compile old code?
Check the release notes for 3.3. I seem to remember that that was deprecated. There might be a switch, but fixing your code is the correct answer. If you've got lots of code, a script to fix it all should be fairly easy. -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
Gustavo Dutra <gdutra@topsystems.com.uy> writes:
Is there any switch to pass the compiler so it recognizes this old behavior, and I can compile old code?
This (multi-line string literals) was depreciated in previous verions of gcc and would have generated a warning. gcc 3.3 has removed support for this (mis)feature[1] and generates an error. You fix is correct, but should really have been done a little earlier so that the removal of the depreciated feature did not catch you out. [1] As far as I am aware it has never been valid C to span string literals across lines. There are 2 'correct' ways of doing this 1) Close the quotes at the end of each line as 2 adjacent string literals are treated as one. 2) Put a backslash at the end of each line to make (lexically) one line.
Graham Murray <graham@gmurray.org.uk> [Mon, 26 May 2003 16:35:44 +0100]:
1) Close the quotes at the end of each line as 2 adjacent string literals are treated as one. 2) Put a backslash at the end of each line to make (lexically) one line.
3) If you want the string to include the newline (that's most of the cases that use multiline strings), either put \n\ at the end of each line or add \n at the end of each adjacent string literal. Philipp -- Philipp Thomas work: pthomas@suse.de Development, SuSE Linux AG private: philipp.thomas@t-link.de
Hi. I just want to ask a question about licensing. I have "borrowed" some code from binutils project and i have put it in my project. My project uses Qt free for Unix. So is it OK to publish my project under GPL? If so, do i have to ask anybody? Thanks.
No you don't need permission and you are allowed to do this. You must however keep the original authors' name and copyright with the code. It would probably be good to mention them in a CREDITS file. On Tuesday 27 May 2003 8:10 am, Filippos Papadopoulos wrote:
Hi. I just want to ask a question about licensing. I have "borrowed" some code from binutils project and i have put it in my project. My project uses Qt free for Unix. So is it OK to publish my project under GPL? If so, do i have to ask anybody?
Thanks.
-- Tom Bradley Software Engineer Jaycor / Titan Systems
First of all, please don't use reply to a thread to ask a new and totally unrelated question. Simply changing the subject still makes your mail part of the thread you reply to, as your MUA will generate In-Reply-To and References Header entries that are used for threading. Filippos Papadopoulos <csst9923@cs.uoi.gr> [27 May 2003 17:10 +0300]:
I have "borrowed" some code from binutils project and i have put it in my project. My project uses Qt free for Unix. So is it OK to publish my project under GPL?
As long as you make it GPL there is no problem. This is the so called viral nature of GPL, i.e. if you incorporate GPL code in your work, it automatically becomes GPL itself. Philipp
Hi, * Philipp Thomas <philipp.thomas@t-link.de> [2003-05-27 18:34]:
This is the so called viral nature of GPL, i.e. if you incorporate GPL code in your work, ...
... and publish it ...
... it automatically becomes GPL itself.
Thorsten -- An eye for an eye, and soon the whole world is blind. - Mahatma Gandhi
Thorsten Haude <linux@thorstenhau.de> [Tue, 27 May 2003 22:09:55 +0200]:
... and publish it ...
Nope, read the license. It automatically makes the including Code GPL as well. But of course nobody will notice until you publish either the code or the binary :)
Hi, * Philipp Thomas <philipp.thomas@t-link.de> [2003-05-27 23:14]:
Thorsten Haude <linux@thorstenhau.de> [Tue, 27 May 2003 22:09:55 +0200]:
... and publish it ...
Nope, read the license. It automatically makes the including Code GPL as well.
A license is simply a non-issue if you don't publish it. Licensing implies publishing. Which part of the license do you refer to? Thorsten -- If you couldn't find any weirdness, maybe we'll just have to make some! - Calvin
A license is simply a non-issue if you don't publish it. Licensing implies publishing.
Not really. You have to take into account the licence of any code you use when you use it, so you know what you're bound to in the future. e.g. in taking the decision to mix GPL code with your own, you define what you can and can't do with your program in future. Like publish it under the terms you want. If you never intend to publish the code, then it doesn't matter so much, but it still means you can never give a copy to a friend, etc. -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
Hi, * Derek Fountain <derekfountain@yahoo.co.uk> [2003-05-28 05:14]:
A license is simply a non-issue if you don't publish it. Licensing implies publishing.
Not really. You have to take into account the licence of any code you use when you use it, so you know what you're bound to in the future.
This is your own code, you can do with it whatever you want until you publish it. No license required. Thorsten -- Wasn't the storming of the Bastille an act of terrorism? Probably. Now it's a holiday. - umarsyed
participants (7)
-
Derek Fountain
-
Filippos Papadopoulos
-
Graham Murray
-
Gustavo Dutra
-
Philipp Thomas
-
Thorsten Haude
-
Tom Bradley