473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

gcc options

Hi all,
does anyone know the gcc equvalent of hp c compiler's -z option
thx

Dec 1 '05 #1
4 2210
Pradeep Kumar wrote:
Hi all,
does anyone know the gcc equvalent of hp c compiler's -z option
thx

You already posted this question in at least one other
newsgroup. Please do so only if the request is topical
in the respective newsgroups (which it is not round here)
and, if you do so, crosspost instead of multiple separate
posts -- this causes less work to the people you ask and
avoids essentially equal replies from different people in
different newsgroups.

Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Dec 1 '05 #2
f compiled with this option, program errors out at any usage of NULL
pointers. The man page for hp cc is below
(Please note that we cannot use ElectricFence tool here for my work)

// portion of man page start
-z Do not bind anything to address zero. This option
allows runtime detection of null pointers. See the
note on pointers below.
// man page portion end

Dec 1 '05 #3
On 2005-12-01, Pradeep Kumar <mb*******@gmail.com> wrote:
f compiled with this option, program errors out at any usage of NULL
pointers. The man page for hp cc is below
(Please note that we cannot use ElectricFence tool here for my work)

// portion of man page start
-z Do not bind anything to address zero. This option
allows runtime detection of null pointers. See the
note on pointers below.
// man page portion end


You should've posted your question to comp.sys.hp.hpux, where it would
have been topical. I'm not quite sure what you're asking because last I
checked, gcc on HP-UX disabled dereferencing null pointers by default,
that is it behaved like HP's compiler if invoked with -z. If you really
wish to enable mapping of address zero, you can use the chatr program to
do this with gcc generated binaries;

gcc prog.c -o prog
chatr +z prog

Disable it with

chatr -z prog

Note that most systems provide no way to map anything at address zero so
your program will not work on them if it relies on this feature. Save
yourself the headache and always treat null pointers as unmapped.

--
Nils R. Weller, Bremen (Germany)
My real email address is ``nils<at>gnulinux<dot>nl''
.... but I'm not speaking for the Software Libre Foundation!
Dec 1 '05 #4
On 30 Nov 2005 23:53:47 -0800, in comp.lang.c , "Pradeep Kumar"
<mb*******@gmail.com> wrote:
f compiled with this option, program errors out at any usage of NULL
pointers. The man page for hp cc is below


Terriffic. Did you actually understand what Michael wrote?

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Dec 1 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
7
by: Hal Vaughan | last post by:
I have a sample script from a book ("Beginning JavaScript" by Paul Wilton) that removes or adds a choice to a <SELECT> element. The <FORM> is form1 and the <SELECT> is theDay. The example uses...
15
by: TJ Walls | last post by:
Hello All, Is it possible to create a <select> element with no selected options? I have tried setting the selectedIndex attribute to -1, but as far as I can tell this only works for <select...
2
by: kiranmn75 | last post by:
I want to dynamically populate a combo box through javascript. Data is coming from a array. Sometimes data list may contain items in excess of 2000. Explorer takes more than 5 seconds to...
5
by: Gregc. | last post by:
Hi Is this correct to clear select items? function(sel){ var selected = sel.options.text; var name=sel.name; (i=1; i<sel.length=0,i++){ sel.options.length=0;}
3
by: Beholder | last post by:
I hope that someone can help me with the following: Short background explenation: I have a shrfepoint page (newform.aspx) in a item list. On this page is a lookup column that displays a lookup...
7
chunk1978
by: chunk1978 | last post by:
hello. so i have 2 select menus which add and remove options from a 3rd select menu... it seems, however, that it's not possible to use different select menus to toggle a 3rd, because when an...
1
by: madflytom | last post by:
Hello, I'm trying to move the options of one select list to another select list. The "source" select list is divided into optgroups, and the "target" select list is not. I want to somehow keep...
1
by: madflytom | last post by:
Hello again all. I posted a question last night about dealing with <optgroups> in select boxes. We've changed directions, and now I need a little more help. Here's the scenario: Two select...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.