Advanced Linux Programming: A-Other Development Tools

Advanced Linux Lập trình được xuất bản dưới Giấy phép xuất bản Open, phiên bản 1, không có tùy chọn thực hiện. Như tôi luôn luôn yêu thương, ebook này đến trong hương vị và không trực tuyến pdf ebook HTML, chúng tôi có thể tải về chương-by-chương, như nhà xuất bản cung cấp các ebook splited chương-by-chương. Tổng khối lượng khoảng 6,5 MB bao gồm cả các bảng của nội dung. | Other Development Tools EVELOPING CORRECT FAST C OR C GNU LlNUX PROGRAMS requires more than just understanding the GNU Linux operating system and its system calls. In this appendix we discuss development tools to find runtime errors such as illegal use of dynamically allocated memory and to determine which parts of a program are taking most of the execution time. Analyzing a program s source code can reveal some of this information by using these runtime tools and actually executing the program you can find out much more. Static Program Analysis Some programming errors can be detected using static analysis tools that analyze the program s source code. If you invoke GCC with -Wall and -pedantic the compiler issues warnings about risky or possibly erroneous programming constructions. By eliminating such constructions you ll reduce the risk of program bugs and you ll find it easier to compile your programs on different GNU Linux variants and even on other operating systems. 260 Appendix A Other Development Tools Using various command options you can cause GCC to issue warnings about many different types of questionable programming constructs. The -Wall option enables most of these checks. For example the compiler will produce a warning about a comment that begins within another comment about an incorrect return type specified for main and about a non void function omitting a return statement. If you specify the -pedantic option GCC emits warnings demanded by strict ANSI C and ISO C compliance. For example use of the GNU asm extension causes a warning using this option. A few GNU extensions such as using alternate keywords beginning with_ two underscores will not trigger warning messages. Although the GCC info pages deprecate use of this option we recommend that you use it anyway and avoid most GNU language extensions because GCC extensions tend to change through time and frequently interact poorly with code optimization. Listing Hello World Program

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.