]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Add var in push_fields_onto_fieldstack
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
8204c077 12015-10-21 Martin Sebor <msebor@redhat.com>
2
3 PR driver/68043
4 * c.opt: End each sentence that describes an option with a period.
5
8523243e 62015-10-20 Marek Polacek <polacek@redhat.com>
7
8 * array-notation-common.c (is_cilkplus_vector_p): Define.
9 * c-common.h (is_cilkplus_vector_p): Declare.
10
08881cb8 112015-10-20 Marek Polacek <polacek@redhat.com>
12
13 * c.opt (std=gnu++11): Do not describe as experimental.
14 (std=gnu++14): Likewise.
15
a36e5e5e 162015-10-19 Jason Merrill <jason@redhat.com>
17
18 * c-cppbuiltin.c (c_cpp_builtins): Define
19 __cpp_nontype_template_args.
20
a349de0a 212015-10-19 Jason Merrill <jason@redhat.com>
22
23 * c-cppbuiltin.c (c_cpp_builtins): Define
24 __cpp_enumerator_attributes, __cpp_fold_expressions,
25 __cpp_unicode_characters.
26
43895be5 272015-10-13 Jakub Jelinek <jakub@redhat.com>
28 Aldy Hernandez <aldyh@redhat.com>
29
30 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
31 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
32 (c_define_builtins): Likewise.
33 * c-common.h (enum c_omp_clause_split): Add
34 C_OMP_CLAUSE_SPLIT_TASKLOOP.
35 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
36 (c_finish_omp_for): Add ORIG_DECLV argument.
37 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
38 201511 instead of 201307.
39 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
40 OMP_CRITICAL_CLAUSES to it.
41 (c_finish_omp_ordered): Add CLAUSES argument, set
42 OMP_ORDERED_CLAUSES to it.
43 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
44 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
45 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
46 constructs and new OpenMP 4.5 clauses. Clear
47 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
48 verification code.
49 * c-pragma.c (omp_pragmas_simd): Add taskloop.
50 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
51 (enum pragma_omp_clause): Add
52 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
53 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
54
20cb53c9 552015-10-05 Richard Sandiford <richard.sandiford@arm.com>
56
57 * c-lex.c (interpret_float): Use real_equal instead of
58 REAL_VALUES_EQUAL.
59
6d02e6b2 602015-10-04 Jason Merrill <jason@redhat.com>
61
62 Implement N4514, C++ Extensions for Transactional Memory.
63 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
64 (c_common_attribute_table): Add transaction_safe_dynamic.
65 transaction_safe now affects type identity.
66 (handle_tm_attribute): Handle transaction_safe_dynamic.
67 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
68 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
69 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
70 (D_TRANSMEM): New.
71 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
72 * c-pretty-print.c (pp_c_attributes_display): Don't print
73 transaction_safe in C++.
74
c0999a5d 752015-10-02 Marek Polacek <polacek@redhat.com>
76
77 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
78
ef17a71a 792015-10-02 Marek Polacek <polacek@redhat.com>
80
81 PR c/64249
82 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
83 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
84 * c.opt (Wduplicated-cond): New option.
85
05b84e7b 862015-10-01 Joseph Myers <joseph@codesourcery.com>
87
88 * c.opt (std=c11): Do not describe as experimental.
89 (std=gnu11): Likewise.
90 (std=iso9899:2011): Likewise.
91
e561d5e1 922015-09-28 Nathan Sidwell <nathan@codesourcery.com>
93
94 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
95 (DEF_FUNCTION_TYPE_VAR_11): Delete.
96
bd4b90d2 972015-09-25 Marek Polacek <polacek@redhat.com>
98
99 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
100 (ubsan_instrument_shift): Likewise.
101
ac13b2b2 1022015-09-25 Marek Polacek <polacek@redhat.com>
103
104 PR sanitizer/64906
105 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
106
a3c82f4c 1072015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
108
109 * c-indentation.c (should_warn_for_misleading_indentation):
110 Compare next_stmt_vis_column with guard_line_first_nws instead
111 of with guard_line_vis_column.
112
5eef101d 1132015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
114
115 PR c/49654
116 PR c/49655
117 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
118 options and options not valid for the current language.
119
60897493 1202015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
121
122 * c-indentation.c (should_warn_for_misleading_indentation):
123 Float out and consolidate the calls to get_visual_column that
124 are passed guard_exploc as an argument. Compare
125 next_stmt_vis_column with guard_line_first_nws instead of with
126 body_line_first_nws.
127
85c93154 1282015-09-22 Nathan Sidwell <nathan@codesourcery.com>
129
130 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
131 Wnamespaces): New C++ warnings.
132
229a58b1 1332015-09-22 Jason Merrill <jason@redhat.com>
134
135 * c-common.h (abi_compat_version_crosses): New.
136 (warn_abi_version): Declare.
137 * c-common.c: Define it.
138 * c-opts.c (c_common_post_options): Handle it.
139 flag_abi_compat_version defaults to 8.
140
2d2de569 1412015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
142
143 Complete the implementation of N4230, Nested namespace definition.
144 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
145 __cpp_nested_namespace_definitions.
146
2b897e68 1472015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
148
149 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
150
ed536208 1512015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
152
153 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
154 when warning.
155 * c-pragma.h (pragma_lex): Add optional loc argument.
156
1dc6c44d 1572015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
158
159 * c-format.c (check_format_arg): Adjust to use common block size in all
160 object pools.
161
be812248 1622015-09-15 David Malcolm <dmalcolm@redhat.com>
163
164 * c-format.c (location_from_offset): Update for change in
165 signature of location_get_source_line.
166 * c-indentation.c (get_visual_column): Likewise.
167 (line_contains_hash_if): Likewise.
168
e4cc057f 1692015-09-14 Marek Polacek <polacek@redhat.com>
170
171 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
172 setting various warnings.
173
85f5e2ee 1742015-09-14 Marek Polacek <polacek@redhat.com>
175
176 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
177 a negative value.
178
1bca8cbd 1792015-09-11 Mark Wielaard <mjw@redhat.com>
180
181 PR c/28901
182 * c.opt (Wunused-variable): Option from common.opt.
183 (Wunused-const-variable): New option.
184
ee48893a 1852015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
186
187 PR c++/53184
188 * c.opt ([Wsubobject-linkage]): Add.
189
547c6b1f 1902015-09-03 Martin Sebor <msebor@redhat.com>
191
192 PR c/66516
193 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
194 functions.
195 * c-common.c (reject_gcc_builtin): Define.
196
7e976b10 1972015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
198
199 PR middle-end/60586
200 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
201 prototype.
202 * c-gimplify.c (c_gimplify_expr): Added a call to the function
203 cilk_gimplify_call_params_in_spawned_fn.
204 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
205 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
206 unwrapping.
207
9e6bcade 2082015-08-25 Marek Polacek <polacek@redhat.com>
209
210 PR middle-end/67330
211 * c-common.c (handle_weak_attribute): Don't check whether the
212 visibility can be changed here.
213
af9de21d 2142015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
215
216 * c-lex.c (c_lex_with_flags): Use explicit locations.
217
6dc50383 2182015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
219
220 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
221 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
222
10902624 2232015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
224
225 PR middle-end/36757
226 * c-common.c (check_builtin_function_arguments): Add check
227 for BUILT_IN_SIGNBIT argument.
228
a03a71ab 2292015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
230
231 PR c++/67160
232 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
233 in c++1z mode.
234
22723c26 2352015-08-17 Marek Polacek <polacek@redhat.com>
236
237 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
238 with whitespaces before qualifier names.
239
f4809955 2402015-08-12 Marek Polacek <polacek@redhat.com>
241
242 PR c++/55095
243 * c-common.c (maybe_warn_shift_overflow): Properly handle
244 left-shifting 1 into the sign bit.
245
5463f502 2462015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
247
248 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
249
56c12fd4 2502015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
251 Braden Obrzut <admin@maniacsvault.net>
252 Jason Merrill <jason@redhat.com>
253
254 Add C++ Concepts TS support.
255 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
256 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
257 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
258 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
259 * c-opts.c (set_std_cxx1z): Set flag_concepts.
260 * c.opt (fconcepts): New.
261
17afcef6 2622015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
263
264 * c-indentation.c (should_warn_for_misleading_indentation):
265 Improve heuristics.
266
f95bfdd4 2672015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
268
269 * c-indentation.c (get_visual_column): Add parameter first_nws,
270 use it. Update comment documenting the function.
271 (is_first_nonwhitespace_on_line): Remove.
272 (should_warn_for_misleading_indentation): Replace usage of
273 of is_first_nonwhitespace_on_line with get_visual_column.
274
9255be07 2752015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
276
277 * c-indentation.h (struct token_indent_info): Define.
278 (get_token_indent_info): Define.
279 (warn_for_misleading_information): Declare.
280 * c-common.h (warn_for_misleading_information): Remove.
281 * c-identation.c (warn_for_misleading_indentation):
282 Change declaration to take three token_indent_infos. Adjust
283 accordingly.
284 * c-identation.c (should_warn_for_misleading_indentation):
285 Likewise. Bail out early if the body is a compound statement.
286 (guard_tinfo_to_string): Define.
287
e880695c 2882015-07-30 Jason Merrill <jason@redhat.com>
289
290 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
291 '*' for reference decay.
292
f58dd84b 2932015-07-30 Marek Polacek <polacek@redhat.com>
294
295 * c-common.c (warn_tautological_cmp): Bail for float types.
296
d9e4fe27 2972015-07-27 Marek Polacek <polacek@redhat.com>
298
299 PR bootstrap/67030
300 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
301
6784a472 3022015-07-27 Marek Polacek <polacek@redhat.com>
303
304 PR c++/66555
305 PR c/54979
306 * c-common.c (find_array_ref_with_const_idx_r): New function.
307 (warn_tautological_cmp): New function.
308 * c-common.h (warn_tautological_cmp): Declare.
309 * c.opt (Wtautological-compare): New option.
310
08034975 3112015-07-23 Marek Polacek <polacek@redhat.com>
312
313 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
314 (ubsan_instrument_shift): Likewise.
315
f6f5e49b 3162015-07-23 Marek Polacek <polacek@redhat.com>
317
318 PR sanitizer/66908
319 * c-ubsan.c: Include gimplify.h.
320 (ubsan_instrument_division): Unshare OP0 and OP1.
321 (ubsan_instrument_shift): Likewise.
322
8d669e79 3232015-07-20 Marek Polacek <polacek@redhat.com>
324 Richard Sandiford <richard.sandiford@arm.com>
325
326 PR c++/55095
327 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
328 Use EXPR_LOC_OR_LOC.
329 (maybe_warn_shift_overflow): New function.
330 * c-common.h (maybe_warn_shift_overflow): Declare.
331 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
332 * c.opt (Wshift-overflow): New option.
333
e16712b1 3342015-07-16 Martin Liska <mliska@suse.cz>
335
336 * c-format.c (static void check_format_info_main): Use
337 object_allocator instead of pool_allocator.
338 (check_format_arg): Likewise.
339 (check_format_info_main): Likewise.
340
e51764ad 3412015-07-15 Andrew MacLeod <amacleod@redhat.com>
342
343 * c-opts.c: Remove multiline #include comment.
344
47ae02b7 3452015-07-12 Aldy Hernandez <aldyh@redhat.com>
346
347 * c-common.c: Fix double word typos.
348
ed2b2eb2 3492015-07-10 Eric Botcazou <ebotcazou@adacore.com>
350
351 * c-ada-spec.h (cpp_operation): Revert latest change.
352 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
353 constructors and destructors.
354
1eacc14a 3552015-07-09 Andrew MacLeod <amacleod@redhat.com>
356
357 * c-common.h: Adjust includes for flags.h changes.
358 * stub-objc.c: Likewise.
47ae02b7 359
0124237f 3602015-07-08 Eric Botcazou <ebotcazou@adacore.com>
361
362 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
363 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
364
386ef929 3652015-07-08 Jakub Jelinek <jakub@redhat.com>
366
367 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
368 are to be removed, return NULL rather than original clauses list.
369
9ef16211 3702015-07-07 Andrew MacLeod <amacleod@redhat.com>
371
372 * array-notation-common.c: Adjust includes.
373 * c-ada-spec.c: Likewise.
374 * c-cilkplus.c: Likewise.
375 * c-common.h: Likewise.
376 * c-cppbuiltin.c: Likewise.
377 * c-dump.c: Likewise.
378 * c-format.c: Likewise.
379 * c-gimplify.c: Likewise.
380 * c-indentation.c: Likewise.
381 * c-lex.c: Likewise.
382 * c-omp.c: Likewise.
383 * c-opts.c: Likewise.
384 * c-pch.c: Likewise.
385 * c-ppoutput.c: Likewise.
386 * c-pragma.c: Likewise.
387 * c-pretty-print.c: Likewise.
388 * c-semantics.c: Likewise.
389 * c-ubsan.c: Likewise.
390 * cilk.c: Likewise.
391 * stub-objc.c: Likewise.
392
67ede3e4 3932015-07-07 Eric Botcazou <ebotcazou@adacore.com>
394
395 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
396 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
397
42af8c2a 3982015-07-01 Jason Merrill <jason@redhat.com>
399
fa769cc5 400 * c-common.h (D_CXX11): Rename from D_CXX0X.
401 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
402 * c-common.c: Adjust.
403
97e9c847 404 * c-opts.c (c_common_post_options): Default to C++14.
405
42af8c2a 406 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
407
30b1ba42 4082015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
409
410 Implement N4197 - Adding u8 character literals
95858835 411 * c-family/c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
412 CPP_CHAR.
413 * c-family/c-common.c (c_parse_error): Print CPP_UTF8CHAR and
414 CPP_UTF8CHAR_USERDEF tokens.
415 * c-family/c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
416 and CPP_UTF8CHAR tokens.
417 (lex_charconst): Treat CPP_UTF8CHAR token.
30b1ba42 418
0949f227 4192015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
420
421 PR fortran/66605
422 * c-common.c (do_warn_unused_parameter): Move here.
423 * c-common.h (do_warn_unused_parameter): Declare.
424
be23b16f 4252015-06-29 Marek Polacek <polacek@redhat.com>
426
427 PR c/66322
428 * c-common.c (check_case_bounds): Add bool * parameter. Set
429 OUTSIDE_RANGE_P.
430 (c_add_case_label): Add bool * parameter. Pass it down to
431 check_case_bounds.
432 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
433 warning here.
434 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
435 declarations.
436
6290f0db 4372015-06-27 Marek Polacek <polacek@redhat.com>
438
439 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
440 or VECTOR_INTEGER_TYPE_P throughout.
441 * c-gimplify.c: Likewise.
442
aa3e402e 4432015-06-26 Marek Polacek <polacek@redhat.com>
444
445 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
446 * c-common.c (c_fully_fold_internal): Likewise.
447 (c_alignof_expr): Likewise.
448 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
449 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8204c077 450 * cilk.c (create_parm_list): Likewise.
aa3e402e 451
4e81b384 4522015-06-26 Marek Polacek <polacek@redhat.com>
453
454 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
455
ec2e0095 4562015-06-25 Andrew MacLeod <amacleod@redhat.com>
457
458 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
459 * c-gimplify.c: Likewise.
460 * c-pragma.c: Likewise.
461 * c-ubsan.c: Likewise.
462 * cilk.c: Likewise.
463
b594087e 4642015-06-25 Richard Sandiford <richard.sandiford@arm.com>
465
466 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
467 ggc_hasher.
468
a3c76fda 4692015-06-25 Andrew MacLeod <amacleod@redhat.com>
470
471 * cilk.c: Move calls.h after tm.h in the include chain.
472
f48c7f4a 4732015-06-25 Marek Polacek <polacek@redhat.com>
474
475 * array-notation-common.c: Use VAR_P throughout.
476 * c-ada-spec.c: Likewise.
477 * c-common.c: Likewise.
478 * c-format.c: Likewise.
479 * c-gimplify.c: Likewise.
480 * c-omp.c: Likewise.
481 * c-pragma.c: Likewise.
482 * c-pretty-print.c: Likewise.
483 * cilk.c: Likewise.
484
ce41e81a 4852015-06-25 Marek Polacek <polacek@redhat.com>
486
487 * cilk.c (extract_free_variables): Use is_global_var.
488
de231ec2 4892015-06-23 Richard Sandiford <richard.sandiford@arm.com>
490
491 * c-common.c: Don't include target-def.h.
492
0200602e 4932015-06-23 Marek Polacek <polacek@redhat.com>
494
495 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
496 when comparing INTEGER_CSTs.
497
99838ed7 4982015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
499
500 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
501 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
502 (dump_ada_template): Skip partially specialized types.
503
a4f59596 5042015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
505
506 * c-common.c (scalar_to_vector): Use std::swap instead of manually
507 swapping.
508
f2ab3bac 5092015-06-17 Andrew MacLeod <amacleod@redhat.com>
510
511 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
512 * c-ada-spec.c: Likewise.
513 * c-cilkplus.c: Likewise.
514 * c-common.c: Likewise.
515 * c-common.h: Likewise.
516 * c-cppbuiltin.c: Likewise.
517 * c-dump.c: Likewise.
518 * c-format.c: Likewise.
519 * c-gimplify.c: Likewise.
520 * c-indentation.c: Likewise.
521 * c-lex.c: Likewise.
522 * c-omp.c: Likewise.
523 * c-opts.c: Likewise.
524 * c-pch.c: Likewise.
525 * c-ppoutput.c: Likewise.
526 * c-pragma.c: Likewise.
527 * c-pretty-print.c: Likewise.
528 * c-semantics.c: Likewise.
529 * c-ubsan.c: Likewise.
530 * cilk.c: Likewise.
531 * stub-objc.c: Likewise.
532
db3d1ffc 5332015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
534
535 PR c++/65168
536 * c-common.c (c_common_truthvalue_conversion): Warn when
537 converting an address of a reference to a truth value.
538
64486212 5392015-06-08 Andrew MacLeod <amacleod@redhat.com>
540
541 * array-notation-common.c : Adjust include files.
542 * c-ada-spec.c : Likewise.
543 * c-cilkplus.c : Likewise.
544 * c-common.c : Likewise.
545 * c-common.h : Likewise.
546 * c-cppbuiltin.c : Likewise.
547 * c-dump.c : Likewise.
548 * c-format.c : Likewise.
549 * c-gimplify.c : Likewise.
550 * c-indentation.c : Likewise.
551 * c-lex.c : Likewise.
552 * c-omp.c : Likewise.
553 * c-opts.c : Likewise.
554 * c-pch.c : Likewise.
555 * c-ppoutput.c : Likewise.
556 * c-pragma.c : Likewise.
557 * c-pretty-print.c : Likewise.
558 * c-semantics.c : Likewise.
559 * c-ubsan.c : Likewise.
560 * cilk.c : Likewise.
561 * stub-objc.c : Likewise.
562
6e84ccad 5632015-06-08 Marek Polacek <polacek@redhat.com>
564
565 PR c/66415
566 * c-format.c (location_from_offset): Return LOC if LINE is null.
567
3a1c9df2 5682015-06-05 Aldy Hernandez <aldyh@redhat.com>
569
570 * c-common.h (c_parse_final_cleanups): New prototype.
571 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
572
f77c0292 5732015-06-04 Andrew MacLeod <amacleod@redhat.com>
574
575 * array-notation-common.c: Adjust includes for restructured coretypes.h.
576 * c-ada-spec.c: Likewise.
577 * c-cilkplus.c: Likewise.
578 * c-common.c: Likewise.
579 * c-common.h: Likewise.
580 * c-cppbuiltin.c: Likewise.
581 * c-dump.c: Likewise.
582 * c-format.c: Likewise.
583 * c-gimplify.c: Likewise.
584 * c-indentation.c: Likewise.
585 * c-lex.c: Likewise.
586 * c-omp.c: Likewise.
587 * c-opts.c: Likewise.
588 * c-pch.c: Likewise.
589 * c-ppoutput.c: Likewise.
590 * c-pragma.c: Likewise.
591 * c-pretty-print.c: Likewise.
592 * c-semantics.c: Likewise.
593 * c-ubsan.c: Likewise.
594 * cilk.c: Likewise.
595 * stub-objc.c: Likewise.
596
7c62dfbb 5972015-06-02 David Malcolm <dmalcolm@redhat.com>
598
599 PR c/66220:
600 * c-indentation.c (should_warn_for_misleading_indentation): Use
601 expand_location rather than expand_location_to_spelling_point.
602 Don't warn if the guarding statement is more indented than the
603 next/body stmts.
604
9af7c176 6052015-06-02 David Malcolm <dmalcolm@redhat.com>
606
607 * c-indentation.c (warn_for_misleading_indentation): Bail out
608 immediately if -Wmisleading-indentation isn't enabled.
609
eebcf436 6102015-06-01 Martin Liska <mliska@suse.cz>
611
612 * c-format.c (check_format_arg):Use new type-based pool allocator.
613 (check_format_info_main) Likewise.
614
b0a23e2f 6152015-05-31 Eric Botcazou <ebotcazou@adacore.com>
616
617 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
618 (has_nontrivial_methods): Likewise.
619
63dc1330 6202015-05-25 Marek Polacek <polacek@redhat.com>
621
622 * c-ubsan.c (ubsan_instrument_shift): Use type0.
623
5a4c69dd 6242015-05-22 Marek Polacek <polacek@redhat.com>
625
626 PR c/47043
627 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
628
044580bb 6292015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3764c94e 630
631 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
632 STACK_GROWS_DOWNWARD.
633
044580bb 6342015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2b785411 635
636 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
637 STACK_GROWS_DOWNWARD rather than if it is defined.
638
d5a2ddc7 6392015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8204c077 640
d5a2ddc7 641 PR c/52952
642 * c-format.c (location_column_from_byte_offset): New.
643 (location_from_offset): New.
644 (struct format_wanted_type): Add offset_loc field.
645 (check_format_info): Move handling of location for extra arguments
646 closer to the point of warning.
647 (check_format_info_main): Pass the result of location_from_offset
648 to warning_at.
649 (format_type_warning): Pass the result of location_from_offset
650 to warning_at.
651
72f8014e 6522015-05-20 Marek Polacek <polacek@redhat.com>
653
654 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
655
74efe522 6562015-05-20 Marek Polacek <polacek@redhat.com>
657
658 * c-ada-spec.c (dump_sloc): Use DECL_P.
659
b443c459 6602015-05-20 Marek Polacek <polacek@redhat.com>
661
662 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
663 * c-common.c: Likewise.
664
551e34da 6652015-05-19 David Malcolm <dmalcolm@redhat.com>
666
667 * c-common.h (fe_file_change): Strengthen param from
668 const line_map * to const line_map_ordinary *.
669 (pp_file_change): Likewise.
670 * c-lex.c (fe_file_change): Likewise.
671 (cb_define): Use linemap_check_ordinary when invoking
672 SOURCE_LINE.
673 (cb_undef): Likewise.
674 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
675 invoking cb_file_change.
676 (c_finish_options): Likewise.
677 (push_command_line_include): Likewise.
678 (cb_file_change): Strengthen param "new_map" from
679 const line_map * to const line_map_ordinary *.
680 * c-ppoutput.c (cb_define): Likewise for local "map".
681 (pp_file_change): Likewise for param "map" and local "from".
682
dfcf26a5 6832015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
684
685 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
686
2e474820 6872015-05-18 Tom de Vries <tom@codesourcery.com>
688
689 * c-common.c (build_va_arg_1): New function.
690 (build_va_arg): Add address operator to va_list operand if necessary.
691
e53013a8 6922015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
693
694 PR c/48956
695 * c-common.c (int_safely_convertible_to_real_p): Define.
696 (unsafe_conversion_p): Check conversions involving complex types.
697 (conversion_warning): Add new warning message for conversions which
698 discard imaginary component.
699 * c-common.h: (enum conversion_safety): Add new enumerator for such
700 conversions.
701
aac24642 7022015-05-14 Marek Polacek <polacek@redhat.com>
703
704 PR c/66066
705 PR c/66127
706 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
707 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
708 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
709 use it. If FOR_INT_CONST, require that all evaluated operands be
710 INTEGER_CSTs.
711
e5f01cba 7122015-05-12 David Malcolm <dmalcolm@redhat.com>
713
714 * c-common.h (warn_for_misleading_indentation): New prototype.
715 * c-indentation.c: New file.
716 * c.opt (Wmisleading-indentation): New option.
717
c37be9ec 7182015-05-12 Tom de Vries <tom@codesourcery.com>
719
720 PR tree-optimization/66010
721 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
722
7290114b 7232015-05-09 Jason Merrill <jason@redhat.com>
724
3c665566 725 * c-opts.c (c_common_post_options): Also clear
726 cpp_opts->cpp_warn_cxx11_compat.
727
d875b9d2 728 * c-common.h (enum cxx_dialect): Add cxx_unset.
729 * c-common.c (cxx_dialect): Initialize to cxx_unset.
730 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
731
7290114b 732 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
733 (std=gnu++0x): Mark as Undocumented.
734 (std=gnu++1y): Add deprecated message.
735
1b03cc89 7362015-05-08 Jason Merrill <jason@redhat.com>
737
1c5f7aba 738 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
739 * c-opts.c: Adjust.
740
1b03cc89 741 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
742
dc5945dc 7432015-05-08 Marek Polacek <polacek@redhat.com>
744
745 PR c/64918
746 * c.opt (Woverride-init-side-effects): New option.
747
cdc64059 7482015-05-07 Marek Polacek <polacek@redhat.com>
749
750 PR c/65179
751 * c-common.c (c_fully_fold_internal): Warn when left shifting a
752 negative value.
753 * c.opt (Wshift-negative-value): New option.
754 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
755 when -Wextra and C99/C++11 mode.
756
8cafe283 7572015-05-07 Marek Polacek <polacek@redhat.com>
758 Martin Uecker <uecker@eecs.berkeley.edu>
759
760 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
761 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
762
cb40a6f7 7632015-05-05 Jason Merrill <jason@redhat.com>
764
765 * c.opt (Wterminate): New.
766
14744a16 7672015-04-30 Marek Polacek <polacek@redhat.com>
768
769 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
770 require that the non-constant be of a boolean type.
771
9866562d 7722015-04-29 Josh Triplett <josh@joshtriplett.org>
773
8cafe283 774 * c-common.c (handle_section_attribute): Refactor to reduce
775 nesting and distinguish between error cases.
9866562d 776
a720ab1c 7772015-04-29 Marek Polacek <polacek@redhat.com>
778
779 PR c/64610
780 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
781 with 0/1.
782
8c072e52 7832015-04-29 Jakub Jelinek <jakub@redhat.com>
784
785 * c-common.h (omp_clause_mask): Unconditionally define as a class.
786 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
787 HOST_BITS_PER_WIDE_INT.
788
f7fec1c7 7892015-04-28 Tom de Vries <tom@codesourcery.com>
790
791 PR tree-optimization/65887
792 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
793
483b3d26 7942015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8cafe283 795 Pierre-Marie de Rodat <derodat@adacore.com>
483b3d26 796
797 * c-ada-spec.c (in_function): Delete.
798 (dump_generic_ada_node): Do not change in_function and remove the
799 redundant code dealing with it.
800 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
801 (print_ada_methods): Output the static member functions in a nested
802 package after the regular methods as well as associated renamings.
803
f11bdffb 8042015-04-24 Marek Polacek <polacek@redhat.com>
805
806 PR c/65830
807 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
808 and OPT_Wshift_count_overflow.
809
485f6b9c 810 PR c/63357
811 * c-common.c (warn_logical_operator): Warn if the operands have the
812 same expressions.
813
439606a9 8142015-04-24 Marek Polacek <polacek@redhat.com>
815
816 PR c/61534
817 * c-common.c (warn_logical_operator): Bail if either operand comes
818 from a macro expansion.
819
de801c28 8202015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
821
822 PR target/55143
823 * c-common.c (c_default_pointer_mode): Add definition.
824 * c-common.h (c_default_pointer_mode): Add declaration.
825
76738f56 8262015-03-11 Jakub Jelinek <jakub@redhat.com>
827
828 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
829 on record_builtin_type argument.
830
16f958b3 8312015-03-10 Jakub Jelinek <jakub@redhat.com>
832
833 PR c/65120
834 * c-common.c (warn_logical_not_parentheses): Don't warn for
835 !x == 0 or !x != 0.
836
9b22f73f 8372015-03-07 Marek Polacek <polacek@redhat.com>
838
839 PR sanitizer/65280
840 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
841 before trying to figure out whether we have a flexible array member.
842
a864b7d4 8432015-03-06 Eric Botcazou <ebotcazou@adacore.com>
844 Jonathan Wakely <jwakely.gcc@gmail.com>
845
846 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
847
9bf8c90b 8482015-03-05 Eric Botcazou <ebotcazou@adacore.com>
849
850 PR ada/65319
851 * c-ada-spec.c (print_destructor): Remove obsolete code.
852
037ac54f 8532015-03-01 Eric Botcazou <ebotcazou@adacore.com>
854
855 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
856 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
857 DECL_TEMPLATE_RESULT emulations.
858 (dump_ada_template)): Add guard for TYPE_METHODS.
859
495cbfb8 8602015-02-27 Marek Polacek <polacek@redhat.com>
861
862 PR c/65040
863 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
864
688a864e 8652015-02-27 Kai Tietz <ktietz@redhat.com>
866
867 PR c/35330
868 * c-pragma.c (handle_pragma_weak): Do not try to create
869 weak/alias of declarations not being function, or variable
870 declarations.
871
6349b8cc 8722015-02-24 Thomas Schwinge <thomas@codesourcery.com>
873
874 PR libgomp/64625
875 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
876 Remove macros.
877 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
878
3afd5369 8792015-02-16 Marek Polacek <polacek@redhat.com>
880
881 PR c/65066
882 * c-format.c (check_format_types): Handle null param.
883
46173d1b 8842015-02-13 Marek Polacek <polacek@redhat.com>
885
886 PR c/65040
887 * c-format.c (check_format_types): Don't warn about different
888 signedness if the original value is in the range of WANTED_TYPE.
889
1d524ff7 8902015-02-12 Jason Merrill <jason@redhat.com>
891
892 PR c++/64956
893 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
894 to the current highest version.
895 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
896
bbf8fbec 8972015-02-04 Jakub Jelinek <jakub@redhat.com>
898
899 PR c/64824
900 PR c/64868
901 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
902 instead of RDIV_EXPR. Use build_binary_op instead of
903 build2_loc.
904
c05be867 9052015-01-30 Joseph Myers <joseph@codesourcery.com>
906
907 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
908 to pass input_location as first argument.
909
85977647 9102015-01-23 Tom de Vries <tom@codesourcery.com>
911
912 PR libgomp/64672
913 * c.opt (fopenacc): Mark as LTO option.
914
fa175926 9152015-01-23 Tom de Vries <tom@codesourcery.com>
916
917 PR libgomp/64707
918 * c.opt (fopenmp): Mark as LTO option.
919
20aad5ba 9202015-01-21 Jakub Jelinek <jakub@redhat.com>
921
922 PR c/63307
8204c077 923 * cilk.c (fill_decls_vec): Only put decls into vector v.
20aad5ba 924 (compare_decls): Fix up formatting.
925
9262015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
927
928 PR c/63307
929 * cilk.c: Include vec.h.
930 (struct cilk_decls): New structure.
931 (wrapper_parm_cb): Split this function to...
932 (fill_decls_vec): ...this...
933 (create_parm_list): ...and this.
934 (compare_decls): New function.
935 (for_local_cb): Remove.
936 (wrapper_local_cb): Ditto.
937 (build_wrapper_type): For now first traverse and fill vector of
938 declarations then sort it and then deal with sorted vector.
939 (cilk_outline): Ditto.
940 (declare_one_free_variable): Ditto.
941
60b77e28 9422015-01-21 Jason Merrill <jason@redhat.com>
943
944 PR c++/64629
945 * c-format.c (check_format_arg): Call decl_constant_value.
946
85fbea97 9472015-01-19 Martin Liska <mliska@suse.cz>
948
949 * c-common.c (handle_noicf_attribute): New function.
950
ca4c3545 9512015-01-15 Thomas Schwinge <thomas@codesourcery.com>
952 Bernd Schmidt <bernds@codesourcery.com>
953 James Norris <jnorris@codesourcery.com>
954 Cesar Philippidis <cesar@codesourcery.com>
955 Ilmir Usmanov <i.usmanov@samsung.com>
956 Jakub Jelinek <jakub@redhat.com>
957
958 * c.opt (fopenacc): New option.
959 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
960 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
961 New macros.
962 * c-common.h (c_finish_oacc_wait): New prototype.
963 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
964 (c_finish_oacc_wait): New function.
965 * c-pragma.c (oacc_pragmas): New variable.
966 (c_pp_lookup_pragma, init_pragma): Handle it.
967 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
968 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
969 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
970 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
971 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
972 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
973 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
974 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
975 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
976 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
977 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
978 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
979 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
980 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
981 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
982 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
983 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
984 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
985 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
986 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
987 PRAGMA_OACC_CLAUSE_WORKER.
988
947aa916 9892015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
990
991 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
992 for the new option fstack-protector_explicit.
993 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
994 (handle_stack_protect_attribute): New function.
995
e4fd7af1 9962015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
997
998 * c.opt: New option -Warray-bounds=.
999
1f78217c 10002015-01-09 Michael Collison <michael.collison@linaro.org>
1001
1002 * array-notation-common.c: Include hash-set.h, machmode.h,
1003 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1004 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1005 * c-ada-spec.c: Ditto.
1006 * c-cilkplus.c: Ditto.
1007 * c-common.c: Include input.h due to flattening of tree.h.
1008 Define macro GCC_C_COMMON_C.
1009 * c-common.h: Flatten tree.h header files into c-common.h.
1010 Remove include of tree-core.h.
1011 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
1012 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1013 fold-const.h, wide-int.h, and inchash.h due to
1014 flattening of tree.h.
1015 * c-dump.c: Ditto.
1016 * c-format.c: Flatten tree.h header files into c-common.h.
1017 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
1018 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1019 fold-const.h, wide-int.h, and inchash.h due to
1020 flattening of tree.h.
1021 * c-dump.c: Include hash-set.h, machmode.h,
1022 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1023 fold-const.h, wide-int.h, and inchash.h due to
1024 flattening of tree.h.
1025 * c-format.c: Include hash-set.h, machmode.h,
1026 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1027 fold-const.h, wide-int.h, inchash.h and real.h due to
1028 flattening of tree.h.
1029 * c-gimplify.c: Include hash-set.h, machmode.h,
1030 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1031 fold-const.h, wide-int.h, and inchash.h due to
1032 flattening of tree.h.
1033 * cilk.c: Ditto.
1034 * c-lex.c: Ditto.
1035 * c-omp.c: Ditto.
1036 * c-opts.c: Ditto.
1037 * c-pch.c: Ditto.
1038 * c-ppoutput.c: Ditto.
1039 * c-pragma.c: Ditto.
1040 * c-pretty-print.c: Ditto.
1041 * c-semantics.c: Ditto.
1042 * c-ubsan.c: Ditto.
1043 * stub-objc.c: Ditto.
1044
411b7663 10452015-01-08 Jason Merrill <jason@redhat.com>
1046
1047 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
1048 do_ubsan_in_current_function.
1049 (ubsan_maybe_instrument_reference_or_call): Likewise.
1050 * c-ubsan.h: Declare it.
1051
d1e96383 10522015-01-08 Mike Stump <mikestump@comcast.net>
1053
1054 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
1055
b57910fa 10562015-01-07 Marek Polacek <polacek@redhat.com>
1057
1058 PR c/64440
1059 * c-common.c (c_fully_fold_internal): Warn for division and modulo
1060 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
1061
678a4e3e 10622015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1063
1064 PR c++/31397
1065 * c.opt (Wsuggest-override): New option.
1066
d353bf18 10672015-01-05 Jakub Jelinek <jakub@redhat.com>
1068
1069 Update copyright years.
1070
92b63884 10712015-01-05 Marek Polacek <polacek@redhat.com>
1072
1073 PR c/64423
1074 * c-common.c (warn_array_subscript_with_type_char): Add location_t
1075 parameter. Use it.
1076 * c-common.h (warn_array_subscript_with_type_char): Update
1077 declaration.
1078
83715bc4 10792014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
1080
1081 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
1082 Control macro with flag_sized_deallocation.
1083
8a8211df 10842014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1085
1086 * c.opt (Wdiscarded-array-qualifiers): New option.
1087
33058239 10882014-12-19 Jakub Jelinek <jakub@redhat.com>
1089
1090 PR preprocessor/63831
1091 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
1092 and __has_cpp_attribute here.
1093 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
1094 c_common_has_attribute.
1095 * c-common.h (c_common_has_attribute): New prototype.
1096 * c-lex.c (init_c_lex): Set cb->has_attribute to
1097 c_common_has_attribute instead of cb_has_attribute.
1098 (get_token_no_padding): New function.
1099 (cb_has_attribute): Renamed to ...
1100 (c_common_has_attribute): ... this. No longer static. Use
1101 get_token_no_padding, require ()s, don't build TREE_LIST
1102 unnecessarily, fix up formatting, adjust diagnostics, call
1103 init_attributes.
1104
d1856d2c 11052014-12-15 Jason Merrill <jason@redhat.com>
1106
1107 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
1108 (-Wsized-deallocation): New.
1109 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
1110 to on in C++14 and up.
1111
4972ed5d 11122014-12-11 Jason Merrill <jason@redhat.com>
1113
7d7fa964 1114 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
1115
4972ed5d 1116 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
1117 we aren't complaining about VLAs.
1118
5ebccf71 11192014-12-06 Marek Polacek <polacek@redhat.com>
1120
1121 PR tree-optimization/64183
1122 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
1123 shift-expression if it is integer_type_node. Use types_compatible_p.
1124
f9e245b2 11252014-11-29 Jakub Jelinek <jakub@redhat.com>
1126
1127 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
1128 last argument from create_tmp_var_raw and create_tmp_var calls.
1129 * cilk.c (gimplify_cilk_spawn): Likewise.
1130 * c-omp.c (c_finish_omp_atomic): Likewise.
1131
d2f60593 11322014-11-28 Marek Polacek <polacek@redhat.com>
1133
1134 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
1135 instead of unsigned_type_node.
1136
fce2dbd1 11372014-11-28 Marek Polacek <polacek@redhat.com>
1138
1139 PR c/63862
1140 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
1141 to op1_utype.
1142 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
1143 expression to unsigned_type_node.
1144
3a4a2292 11452014-11-20 Mark Wielaard <mjw@redhat.com>
1146
1147 PR debug/38757
1148 * c-opts.c (set_std_c89): Set lang_hooks.name.
1149 (set_std_c99): Likewise.
1150 (set_std_c11): Likewise.
1151 (set_std_cxx98): Likewise.
1152 (set_std_cxx11): Likewise.
1153 (set_std_cxx14): Likewise.
1154 (set_std_cxx1z): Likewise.
1155
c61ef207 11562014-11-21 Jakub Jelinek <jakub@redhat.com>
1157
1158 PR target/63764
1159 * c-common.h (convert_vector_to_pointer_for_subscript): Change
1160 return type to bool.
c9ed79de 1161 * c-common.c: Include gimple-expr.h.
c61ef207 1162 (convert_vector_to_pointer_for_subscript): Change return type to
1163 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
1164 and copy it into a TARGET_EXPR and use that instead of *vecp
1165 directly.
1166
1a91d914 11672014-11-19 David Malcolm <dmalcolm@redhat.com>
1168
1169 Merger of git branch "gimple-classes-v2-option-3".
1170 * ChangeLog.gimple-classes: New.
1171 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
1172 from being just a vec<gimple> to a vec<gbind *>.
1173
f8fc8b8e 11742014-11-18 Jakub Jelinek <jakub@redhat.com>
1175
1176 PR sanitizer/63813
1177 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
1178 argument to ptype, set type to TREE_TYPE (ptype). Don't call
1179 get_pointer_alignment for non-pointers. Use ptype, or if it is
1180 reference type, corresponding pointer type, as type of kind
1181 argument.
1182 (ubsan_maybe_instrument_reference,
1183 ubsan_maybe_instrument_member_call): Adjust callers.
1184
8315e35e 11852014-11-15 Marek Polacek <polacek@redhat.com>
1186
1187 PR middle-end/63884
1188 * array-notation-common.c (is_sec_implicit_index_fn): Return false
1189 for NULL fndecl.
1190 (extract_array_notation_exprs): Return for NULL node.
1191
86b9f14b 11922014-11-12 Joseph Myers <joseph@codesourcery.com>
1193
1194 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
1195 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
1196
0c93c8a9 11972014-11-12 Jakub Jelinek <jakub@redhat.com>
1198
1199 PR c/59708
1200 * c-common.c (check_builtin_function_arguments): Handle
1201 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
1202
fdd735a7 12032014-11-10 Andi Kleen <ak@linux.intel.com>
1204
1205 PR c/60804
1206 * c-common.h (check_no_cilk): Declare.
1207 * cilk.c (get_error_location): New function.
1208 (check_no_cilk): Dito.
1209
5cb678b4 12102014-11-10 Andi Kleen <ak@linux.intel.com>
1211
1212 * cilk.c (recognize_spawn): Use expression location
1213 for error message.
1214
0feb4de1 12152014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1216
1217 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
1218
3aa2fa44 12192014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1220
1221 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
1222 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
1223 (__cpp_range_based_for, __cpp_initializer_lists,
1224 __cpp_delegating_constructors, __cpp_nsdmi,
1225 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
1226 for C++11; (__cpp_attribute_deprecated): Remove in favor of
1227 __has_cpp_attribute.
1228 * c-lex.c (cb_has_attribute): New callback CPP function;
1229 (init_c_lex): Set has_attribute callback.
1230
7fd22aae 12312014-11-04 Richard Biener <rguenther@suse.de>
1232
1233 * c-common.c (shorten_compare): Do not shorten mixed
1234 DFP and non-DFP compares.
1235
4af203ac 12362014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1237
1238 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
1239 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
1240 Commentary and rearrangement of tests.
1241 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
1242 Commentary and rearrangement of tests.
1243 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
1244 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
1245
3754d046 12462014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1247
1248 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
1249 enum from machine_mode.
1250
1140c305 12512014-10-28 Andrew MacLeod <amacleod@redhat.com>
1252
1f78217c 1253 * c-common.c: Adjust include files.
1254 * c-gimplify.c: Ditto.
1255 * cilk.c: Ditto.
1256 * c-pragma.c: Ditto.
1257 * c-ubsan.c: Ditto.
1140c305 1258
94ea8568 12592014-10-27 Andrew MacLeod <amacleod@redhat.com>
1260
1261 * c-gimplify.c: Adjust include files.
1262
32ecf960 12632014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1264
1265 PR c++/53061
1266 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
1267 c_common_initialize_diagnostics.
1268 * c-common.h: Likewise.
1269
85fecbe2 12702014-10-24 Marek Polacek <polacek@redhat.com>
1271
1272 PR c/56980
1273 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
1274 print "struct"/"union"/"enum" for typedefed names.
1275
e7ec033a 12762014-10-23 Marek Polacek <polacek@redhat.com>
1277
1278 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
1279 in unsigned type.
1280
c2598081 12812014-10-22 Jakub Jelinek <jakub@redhat.com>
1282 Yury Gribov <y.gribov@samsung.com>
1283
1284 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
1285 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
1286 instead of flag_sanitize_recover as bool flag.
1287
acebb7e2 12882014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
1289
1290 * cilk.c: Revert previous change.
1291
6115016c 12922014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
1293
1294 PR c/63307
1295 * cilk.c: Include vec.h.
1296 (struct cilk_decls): New structure.
1297 (wrapper_parm_cb): Split this function to...
1298 (fill_decls_vec): ...this...
1299 (create_parm_list): ...and this.
1300 (compare_decls): New function.
1301 (for_local_cb): Remove.
1302 (wrapper_local_cb): Ditto.
1303 (build_wrapper_type): For now first traverse and fill vector of
1304 declarations then sort it and then deal with sorted vector.
1305 (cilk_outline): Ditto.
1306 (declare_one_free_variable): Ditto.
1307
e610d2b2 13082014-10-17 Marek Polacek <polacek@redhat.com>
1309
1310 * c-opts.c (c_common_post_options): Set warn_implicit_int.
1311 * c.opt (Wimplicit-int): Initialize to -1.
1312
a3020f2f 13132014-10-16 Andrew MacLeod <amacleod@redhat.com>
1314
1315 * c-pragma.c: Adjust include files.
1316 * c-semantics.c: Likewise.
1317
926ddd2c 13182014-10-16 DJ Delorie <dj@redhat.com>
1319
1320 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
1321 multiples of bytes.
1322
b0542e7c 13232014-10-14 Jason Merrill <jason@redhat.com>
1324
1325 PR c++/63455
1326 * c-common.h (CPP_PREPARSED_EXPR): New.
1327 (N_CP_TTYPES): Adjust.
1328
b2601928 13292014-10-15 Marek Polacek <polacek@redhat.com>
1330
1331 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
1332
9f75f026 13332014-10-14 DJ Delorie <dj@redhat.com>
1334
1335 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
1336 types, not just __int128.
1337 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
1338 types, not just __int128.
1339 (cpp_atomic_builtins): Round pointer sizes up.
1340 (type_suffix): Use type precision, not specific types.
1341 * c-common.c (c_common_reswords): Remove __int128 special case.
1342 (c_common_type_for_size): Check for all __intN types, not just
1343 __int128.
1344 (c_common_type_for_mode): Likewise.
1345 (c_common_signed_or_unsigned_type): Likewise.
1346 (c_build_bitfield_integer_type): Likewise.
1347 (c_common_nodes_and_builtins): Likewise.
1348 (keyword_begins_type_specifier): Likewise.
1349 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
1350 __intN variants.
1351
2ef51f0e 13522014-10-12 Trevor Saunders <tsaunders@mozilla.com>
1353
1354 * c-common.c: Use hash_table instead of hashtab.
1355
5b8257e3 13562014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1357
1f78217c 1358 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5b8257e3 1359 C++11 section.
1360
5e84569c 13612014-10-03 Marc Glisse <marc.glisse@inria.fr>
1362
1363 PR c++/54427
1364 PR c++/57198
1365 PR c++/58845
1366 * c-common.c (warn_logical_operator): Punt for vectors.
1367
f6751ff2 13682014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1369
1370 Implement SD-6: SG10 Feature Test Recommendations
1371 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
1372 macros and the __has_header macro.
1373
c33e051d 13742014-09-30 Jason Merrill <jason@redhat.com>
1375
f76a9aa8 1376 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
1377 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
1378 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
1379
717e52f9 1380 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
1381 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
1382
c33e051d 1383 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
1384 * c-common.c (c_common_reswords): Remove __is_convertible_to.
1385
5213d6c9 13862014-09-24 Marek Polacek <polacek@redhat.com>
1387
1388 PR c/61405
1389 PR c/53874
1390 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
1391
6b722052 13922014-09-23 Andi Kleen <ak@linux.intel.com>
1393
1394 * c-common.c (handle_no_reorder_attribute): New function.
1395 (c_common_attribute_table): Add no_reorder attribute.
1396
0cb69d12 13972014-09-22 Joseph Myers <joseph@codesourcery.com>
1398
1399 * c-cppbuiltin.c (c_cpp_builtins): Define
1400 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
1401 modes.
1402
168dfbf0 14032014-09-18 Joseph Myers <joseph@codesourcery.com>
1404
1405 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
1406 for supported floating-point modes.
1407
b83705f4 14082014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
1409
1410 * c.opt (Wpsabi): Use LangEnabledBy.
1411 * c-opts.c (c_common_handle_option): Do not handle here.
1412
d5957f0d 14132014-09-12 Joseph Myers <joseph@codesourcery.com>
1414
1415 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
1416 macros for floating-point modes.
1417
bae6edff 14182014-09-11 Marc Glisse <marc.glisse@inria.fr>
1419
1420 PR target/58757
1421 * c-cppbuiltin.c (builtin_define_float_constants): Correct
1422 __*_DENORM_MIN__ without denormals.
1423
73a69d02 14242014-09-10 Jakub Jelinek <jakub@redhat.com>
1425
1426 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
1427 ubsan_instrument_vla, ubsan_instrument_return): Adjust
1428 ubsan_create_data callers.
1429 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
1430 index is constant or BIT_AND_EXPR with constant mask and is
1431 small enough for the bound.
1432 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
1433 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
1434
7ff8db31 14352014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1436
1437 * c.opt: Add CppReason to various flags.
1438 (Wdate-time): Re-sort.
1439 * c-common.c: Include c-common.h earlier.
1440 (struct reason_option_codes_t): Delete.
1441 (c_option_controlling_cpp_error): Prefix global type and struct
1442 with cpp_.
1443
bcc1f37e 14442014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1445
1446 * c.opt (Wnormalized): New.
1447 (Wnormalized=): Use Enum and Reject Negative.
1448 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
1449
b660d3c6 14502014-09-08 Joseph Myers <joseph@codesourcery.com>
1451
1452 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
1453 digits of floating-point modes if -fbuilding-libgcc.
1454
325b8c3c 14552014-09-05 Joseph Myers <joseph@codesourcery.com>
1456
1457 * c-cppbuiltin.c (c_cpp_builtins): Also define
1458 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
1459 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
1460 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
1461 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
1462 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
1463 __LIBGCC_STACK_GROWS_DOWNWARD__,
1464 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
1465 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
1466 __LIBGCC_DWARF_FRAME_REGISTERS__,
1467 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
1468 __LIBGCC_STACK_POINTER_REGNUM__ and
1469 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
1470 (builtin_define_with_value): Handle backslash-escaping in string
1471 macro values.
1472
1e074e77 14732014-09-05 Richard Biener <rguenther@suse.de>
1474
1475 PR middle-end/63148
1476 * c-format.c (check_format_arg): Properly handle
1477 effectively signed POINTER_PLUS_EXPR offset.
1478
04afd878 14792014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
1480
1481 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
1482 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
1483 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
1484 and Init.
1485 * c-opts.c (c_common_handle_option): Do not handle here.
1486 (sanitize_cpp_opts): Likewise.
1487 * c-common.c (struct reason_option_codes_t): Handle
1488 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
1489
a3f448f0 14902014-09-03 Marek Polacek <polacek@redhat.com>
1491
1492 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
1493
40750995 14942014-09-02 Jakub Jelinek <jakub@redhat.com>
1495 Balaji V. Iyer <balaji.v.iyer@intel.com>
1496 Igor Zamyatin <igor.zamyatin@intel.com>
1497
1498 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
1499 * c-common.c (c_common_reswords): Added _Cilk_for.
1500 * c-common.h (enum rid): Added RID_CILK_FOR.
1501 (cilk_for_number_of_iterations): Add declaration.
1502 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
1503 CILK_FOR.
1504 * c-pragma.c (init_pragma): Register "grainsize" pragma.
1505 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
1506
f0fbe519 15072014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1508
1509 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
1510 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
1511 Wundef): Use CPP, Var and Init.
1512 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
1513
a7d2e480 15142014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1515
1516 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
1517 * c-opts.c (c_common_handle_option): Do not handle here.
1518
c35e53f1 15192014-08-25 Jason Merrill <jason@redhat.com>
1520
1521 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
1522 -std=c++14 and -std=gnu++14, rather than the reverse.
1523 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
1524 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
1525 * c-common.h (cxx_dialect): Remove cxx1y.
1526
4e454776 15272014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
1528
1529 * c-common.h (enum cxx_dialect): Add cxx14.
1530 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
1531 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
1532 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
1533
af1a80f2 15342014-08-22 Jason Merrill <jason@redhat.com>
1535
1536 * c.opt (std=gnu++17): Fix alias.
1537
dc6229e8 15382014-08-22 Marek Polacek <polacek@redhat.com>
1539
1540 PR c++/62199
1541 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
1542 check for vector types. Drop LHS argument.
1543 * c-common.h (warn_logical_not_parentheses): Adjust.
1544
ba7f7c88 15452014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1546
1547 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
1548 (Wmultichar): Likewise.
1549 (Wdate-time): Use C-family languages instead of Common. Use CPP
1550 and Var.
1551 * c-opts.c (c_common_handle_option): Do not handle the above
1552 options here.
1553 (sanitize_cpp_opts): Likewise.
1554
399d4f80 15552014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1556
1557 PR fortran/44054
1558 * c-opts.c: Include tree-diagnostics.h.
1559 (c_diagnostic_finalizer): New.
1560 (c_common_initialize_diagnostics): Use it.
1561
1babed5f 15622014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1563
1564 PR preprocessor/51303
1565 * c-common.c (struct reason_option_codes_t option_codes):
1566 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
1567
3636964b 15682014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1569
1570 PR c/60975
1571 PR c/53063
1572 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
1573 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
1574 (c_common_post_options): Call init_global_opts_from_cpp.
1575 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
1576
78bf4156 15772014-08-19 Marek Polacek <polacek@redhat.com>
1578
1579 PR c++/62153
1580 * c-common.c (maybe_warn_bool_compare): New function.
1581 * c-common.h (maybe_warn_bool_compare): Declare.
1582 * c.opt (Wbool-compare): New option.
1583
508ea33a 15842014-08-19 Marek Polacek <polacek@redhat.com>
1585
1586 * c.opt (Wc99-c11-compat): New option.
1587
806fe15e 15882014-08-19 Marek Polacek <polacek@redhat.com>
1589
1590 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
1591 to warn_c90_c99_compat.
1592 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
1593 to -1.
1594
6c867de1 15952014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
1596 Steven Bosscher <steven@gcc.gnu.org>
1597
1598 PR c/52952
1599 * c-format.c: Add extra_arg_loc and format_string_loc to struct
1600 format_check_results.
1601 (check_function_format): Use true and add comment for boolean
1602 argument.
1603 (finish_dollar_format_checking): Use explicit location when warning.
1604 (check_format_info): Likewise.
1605 (check_format_arg): Set extra_arg_loc and format_string_loc.
1606 (check_format_info_main): Use explicit location when warning.
1607 (check_format_types): Pass explicit location.
1608 (format_type_warning): Likewise.
1609
dc8078a3 16102014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
1611
1612 PR fortran/44054
1613 * c-format.c: Handle Fortran flags.
1614
d271ec7e 16152014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
1616
1617 PR other/61962
1618 * array-notation-common.c (find_rank): Added handling for other
1619 types of references.
1620
890c2e2f 16212014-08-10 Marek Polacek <polacek@redhat.com>
1622
1623 PR c/51849
1624 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
1625 * c.opt (Wc90-c99-compat): Add option.
1626
7149db5f 16272014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1628
1629 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
1630
2d2f6a15 16312014-08-03 Marek Polacek <polacek@redhat.com>
1632
1633 * c-common.c (check_case_value): Add location_t parameter. Use it.
1634 (c_add_case_label): Pass loc to check_case_value.
1635
06ecf488 16362014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1637
1638 * cilk.c: Use hash_map instead of pointer_map.
1639
431205b7 16402014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1641
1642 * c-gimplify.c: Use hash_set instead of pointer_set.
1643
3394c80c 16442014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1645
1646 PR middle-end/61455
1647 * array-notation-common.c (extract_array_notation_exprs): Handling
1648 of DECL_EXPR added.
1649
392dee1e 16502014-08-01 Jakub Jelinek <jakub@redhat.com>
1651
1652 * c-common.h (min_align_of_type): Removed prototype.
1653 * c-common.c (min_align_of_type): Removed.
1654 * c-ubsan.h (ubsan_maybe_instrument_reference,
1655 ubsan_maybe_instrument_member_call): New prototypes.
1656 * c-ubsan.c: Include stor-layout.h and builtins.h.
1657 (ubsan_maybe_instrument_reference_or_call,
1658 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
1659 functions.
1660
f22a2cb7 16612014-07-31 Marc Glisse <marc.glisse@inria.fr>
1662
1663 PR c++/60517
1664 * c.opt (-Wreturn-local-addr): Move to common.opt.
1665
87b0198f 16662014-07-30 Jason Merrill <jason@redhat.com>
1667
1668 PR c++/61659
1669 PR c++/61687
1670 Revert:
1671 * c.opt (-fuse-all-virtuals): New.
1672
74691f46 16732014-07-30 Tom Tromey <tromey@redhat.com>
1674
1675 PR c/59855
1676 * c.opt (Wdesignated-init): New option.
1677 * c-common.c (c_common_attribute_table): Add "designated_init".
1678 (handle_designated_init): New function.
1679
9140d56f 16802014-07-24 Marek Polacek <polacek@redhat.com>
1681
1682 PR c/57653
1683 * c-opts.c (c_finish_options): If -imacros is in effect, return.
1684
a09c5cc2 16852014-07-16 Dodji Seketeli <dodji@redhat.com>
1686
1687 PR preprocessor/60723 - missing system-ness marks for macro tokens
1688 * c-ppoutput.c (struct print::prev_was_system_token): New data
1689 member.
1690 (init_pp_output): Initialize it.
1691 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
1692 (do_line_change): Return a flag saying if a line marker was
1693 emitted or not.
1694 (scan_translation_unit): Detect if the system-ness of the token we
1695 are about to emit is different from the one of the previously
1696 emitted token. If so, emit a line marker. Avoid emitting useless
1697 adjacent line markers. Avoid emitting line markers for tokens
1698 originating from the expansion of built-in macros.
1699 (scan_translation_unit_directives_only): Adjust.
1700
2b25b62f 17012014-07-15 Marek Polacek <polacek@redhat.com>
1702
1703 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
1704 TYPE_MAX_VALUE is NULL.
1705
305d96bc 17062014-07-14 Jakub Jelinek <jakub@redhat.com>
1707
1708 PR middle-end/61294
1709 * c.opt (Wmemset-transposed-args): New warning.
1710
8ea4660d 17112014-07-10 Jason Merrill <jason@redhat.com>
1712
1713 PR c++/61659
1714 PR c++/61687
1715 * c.opt (-fuse-all-virtuals): New.
1716
cd480f3d 17172014-07-09 Richard Biener <rguenther@suse.de>
1718
1719 PR c-family/61741
1720 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
1721 using unsigned arithmetic if overflow does not wrap instead of
1722 if overflow is undefined.
1723
87d59e72 17242014-07-06 Marek Polacek <polacek@redhat.com>
1725
1726 PR c/6940
1727 * c.opt (Wsizeof-array-argument): New option.
1728
d69521d8 17292014-07-03 Jakub Jelinek <jakub@redhat.com>
1730
8204c077 1731 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
d69521d8 1732 comments->count <= 1, as comments->entries might be NULL.
1733
1207866e 17342014-07-01 Marek Polacek <polacek@redhat.com>
1735
1736 * c.opt (Wint-conversion): New option.
1737
7a6bbb76 17382014-07-01 Marek Polacek <polacek@redhat.com>
1739
1740 PR c/58286
1741 * c.opt (Wincompatible-pointer-types): New option.
1742
9d4eeb52 17432014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1744
1745 PR c++/51400
1746 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
1747 Do not discard TYPE_QUALS of type.
1748
4b53bc0f 17492014-06-26 Jason Merrill <jason@redhat.com>
1750
1751 * c-common.h (enum cxx_dialect): Add cxx1z.
1752 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
1753 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
1754
a8a8d4ea 17552014-06-26 Teresa Johnson <tejohnson@google.com>
1756
1757 * c-common.h (get_dump_info): Declare.
1758 * c-gimplify.c (c_genericize): Use saved dump files.
1759 * c-opts.c (c_common_parse_file): Begin and end dumps
1760 once around parsing invocation.
1761 (get_dump_info): New function.
1762
1f6be080 17632014-06-23 Marek Polacek <polacek@redhat.com>
1764 Andrew MacLeod <amacleod@redhat.com>
1765
1766 PR c/61553
1767 * c-common.c (get_atomic_generic_size): Don't segfault if the
1768 type doesn't have a size.
1769
5ef6b660 17702014-06-20 Marek Polacek <polacek@redhat.com>
1771
1772 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
1773 (ubsan_walk_array_refs_r): New function.
1774 (c_genericize): Instrument array bounds.
1775 * c-ubsan.c: Include "internal-fn.h".
1776 (ubsan_instrument_division): Mark instrumented arrays as having
1777 side effects. Adjust ubsan_type_descriptor call.
1778 (ubsan_instrument_shift): Likewise.
1779 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
1780 (ubsan_instrument_bounds): New function.
1781 (ubsan_array_ref_instrumented_p): New function.
1782 (ubsan_maybe_instrument_array_ref): New function.
1783 * c-ubsan.h (ubsan_instrument_bounds): Declare.
1784 (ubsan_array_ref_instrumented_p): Declare.
1785 (ubsan_maybe_instrument_array_ref): Declare.
1786
17872014-06-20 Hale Wang <hale.wang@arm.com>
3ccd1e6e 1788
1789 PR lto/61123
1790 * c.opt (fshort-enums): Add to LTO.
1791 * c.opt (fshort-wchar): Likewise.
1792
78438f31 17932014-06-16 Marek Polacek <polacek@redhat.com>
1794
1795 PR c/60439
1796 * c.opt (Wswitch-bool): Add Var.
1797
5fddcf34 17982014-06-12 Jakub Jelinek <jakub@redhat.com>
1799
1800 PR middle-end/61486
1801 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
1802 #pragma omp target teams or
1803 #pragma omp {,target }teams distribute simd.
1804
74b777e5 18052014-06-12 Jason Merrill <jason@redhat.com>
1806
1807 * c.opt (Wabi=, fabi-compat-version): New.
1808 * c-opts.c (c_common_handle_option): Handle -Wabi=.
1809 (c_common_post_options): Handle flag_abi_compat_version default.
1810 Disallow -fabi-compat-version=1.
1811 * c-common.h (abi_version_crosses): New.
1812
738a6bda 18132014-06-11 Jan Hubicka <hubicka@ucw.cz>
1814
1f78217c 1815 * c-common.c (handle_section_attribute): Update handling for
738a6bda 1816 section names that are no longer trees.
1817
cf5f881f 18182014-06-10 Jakub Jelinek <jakub@redhat.com>
1819
1820 PR fortran/60928
1821 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
1822 (omp_pragmas): ... back here.
1823
32dc1512 18242014-06-05 Marek Polacek <polacek@redhat.com>
1825
1826 PR c/49706
1827 * c-common.c (warn_logical_not_parentheses): New function.
1828 * c-common.h (warn_logical_not_parentheses): Declare.
1829 * c.opt (Wlogical-not-parentheses): New option.
1830
f61a9bc2 18312014-06-04 Marek Polacek <polacek@redhat.com>
1832
1833 PR c/30020
1834 * c-common.c (check_case_bounds): Add location parameter.
1835 Use it.
1836 (c_add_case_label): Pass loc to check_case_bounds.
1837
c69ec07d 18382014-06-03 Marek Polacek <polacek@redhat.com>
1839
1840 PR c/60439
1841 * c.opt (Wswitch-bool): New option.
1842
3c77ca67 18432014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1844
68a2c870 1845 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
1846 Remove prototypes.
1847 (record_types_used_by_current_var_decl): Move prototype to where
1848 it belongs.
1849
3c77ca67 1850 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1851 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1852 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1853
3ab4693e 18542014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1855
1856 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
1857 * c-common.c (c_common_nodes_and_builtins): Don't initialize
1858 void_zero_node.
1859 * c-pretty-print.c (pp_c_void_constant): New function.
1860 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
1861 (c_pretty_printer::expression): Handle VOID_CST.
1862 * cilk.c (extract_free_variables): Likewise.
1863 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
1864 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
1865
25a27413 18662014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1867
1868 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
1869 * c-pragma.c (push_alignment): Adjust.
1870 (handle_pragma_push_options): Likewise.
1871
3e5a8b00 18722014-05-09 Marek Polacek <polacek@redhat.com>
1873
1874 PR c/50459
1875 * c-common.c (check_user_alignment): Return -1 if alignment is error
1876 node.
1877 (handle_aligned_attribute): Don't call default_conversion on
1878 FUNCTION_DECLs.
1879 (handle_vector_size_attribute): Likewise.
1880 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
1881 (handle_sentinel_attribute): Call default_conversion and allow even
1882 integral types as an argument.
1883
c2c4ae8d 18842014-05-08 Marek Polacek <polacek@redhat.com>
1885
1886 PR c/61053
1887 * c-common.c (min_align_of_type): New function factored out from...
1888 (c_sizeof_or_alignof_type): ...here.
1889 * c-common.h (min_align_of_type): Declare.
1890
2026249a 18912014-05-08 Marek Polacek <polacek@redhat.com>
1892
1893 PR c/61077
1894 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
1895 parameter type of main.
1896
33c8dcfe 18972014-05-07 DJ Delorie <dj@redhat.com>
1898
1899 * c-cppbuiltin.c (print_bits_of_hex): New.
1900 (builtin_define_type_minmax): Print values using hex so as not to
1901 require a pre-computed list of string values.
1902
960d5a55 19032014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1904 Mike Stump <mikestump@comcast.net>
1905 Richard Sandiford <rdsandiford@googlemail.com>
1906
1907 * c-ada-spec.c: Include wide-int.h.
1908 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
1909 (dump_generic_ada_node): Use wide-int interfaces.
1910 * c-common.c: Include wide-int-print.h.
1911 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
1912 (pointer_int_sum): Use wide-int interfaces.
1913 (c_common_nodes_and_builtins): Use make_int_cst.
1914 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
1915 (handle_alloc_size_attribute): Use wide-int interfaces.
1916 (get_nonnull_operand): Likewise.
1917 * c-format.c (get_constant): Use tree_fits_uhwi_p.
1918 * c-lex.c: Include wide-int.h.
1919 (narrowest_unsigned_type): Take a widest_int rather than two
1920 HOST_WIDE_INTs.
1921 (narrowest_signed_type): Likewise.
1922 (interpret_integer): Update accordingly. Use wide-int interfaces.
1923 (lex_charconst): Use wide-int interfaces.
1924 * c-pretty-print.c: Include wide-int.h.
1925 (pp_c_integer_constant): Use wide-int interfaces.
1926 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
1927 INT_CST_LT_UNSIGNED.
1928
bbb88b31 19292014-05-06 Richard Biener <rguenther@suse.de>
1930
1931 * c-opts.c (c_common_post_options): For -freestanding,
1932 -fno-hosted and -fno-builtin disable pattern recognition
1933 if not enabled explicitely.
1934
022d4718 19352014-05-02 Marek Polacek <polacek@redhat.com>
1936
1937 * c.opt (Wsizeof-pointer-memaccess): Describe option.
1938
e4ab2ef3 19392014-05-01 Marek Polacek <polacek@redhat.com>
1940
1941 PR c/43245
1942 * c.opt (Wdiscarded-qualifiers): Add.
1943
52cc0072 19442014-04-30 Marek Polacek <polacek@redhat.com>
1945
1946 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
1947 INT_MIN / -1 sanitization only for integer types.
1948
4a026b48 19492014-04-25 Marek Polacek <polacek@redhat.com>
1950
1951 PR c/18079
1952 * c-common.c (handle_noinline_attribute): Warn if the attribute
1953 conflicts with always_inline attribute.
1954 (handle_always_inline_attribute): Warn if the attribute conflicts
1955 with noinline attribute.
1956
90e645fa 19572014-04-25 Marek Polacek <polacek@redhat.com>
1958
1959 PR c/60156
1960 * c-common.c (check_main_parameter_types): Warn about variadic main.
1961
db103ea4 19622014-04-24 Mike Stump <mikestump@comcast.net>
1963
1964 * c.opt (Wshadow-ivar): Default to on.
1965
06511efd 19662014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
1967
1968 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
1969
cdf34fca 19702014-04-23 Marek Polacek <polacek@redhat.com>
1971
1972 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
1973
7311d7c1 19742014-04-22 Jakub Jelinek <jakub@redhat.com>
1975
1976 PR sanitizer/60275
1977 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
1978 if flag_sanitize_undefined_trap_on_error.
1979 (ubsan_instrument_division, ubsan_instrument_shift,
1980 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
1981 if !flag_sanitize_recover.
1982
c1917557 19832014-04-22 Marc Glisse <marc.glisse@inria.fr>
1984
1985 PR libstdc++/43622
1986 * c-common.c (registered_builtin_types): Make non-static.
1987 * c-common.h (registered_builtin_types): Declare.
1988
b2ca6510 19892014-04-14 Richard Biener <rguenther@suse.de>
1990 Marc Glisse <marc.glisse@inria.fr>
1991
1992 PR c/60819
1993 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
1994 apply may-alias the scalar pointer type when applicable.
1995
855372a3 19962014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1997
1998 PR middle-end/60467
1999 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
2000 as possible argument for Cilk_spawn.
2001
4012a986 20022014-04-11 Tobias Burnus <burnus@net-b.de>
2003
2004 PR c/60194
2005 * c.opt (Wformat-signedness): Add
2006 * c-format.c(check_format_types): Use it.
2007
0d284870 20082014-04-11 Jason Merrill <jason@redhat.com>
2009
2010 PR c++/57926
2011 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
2012 default_conversion for an array argument.
2013
a34c1231 20142014-04-08 Marek Polacek <polacek@redhat.com>
2015
2016 PR sanitizer/60745
2017 * c-ubsan.c: Include asan.h.
2018 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
2019
a35a8e18 20202014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2021
2022 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
2023
b23e42b6 20242014-04-02 Marek Polacek <polacek@redhat.com>
2025
2026 * c-common.h (c_expand_expr): Remove declaration.
2027
5a672e62 20282014-03-28 Jakub Jelinek <jakub@redhat.com>
2029
2030 PR c++/60689
2031 * c-common.c (add_atomic_size_parameter): When creating new
2032 params vector, push the size argument first.
2033
d4d068c0 20342014-03-26 Jakub Jelinek <jakub@redhat.com>
2035
2036 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
2037 ubsan_instrument_vla, ubsan_instrument_return): Adjust
2038 ubsan_create_data callers.
2039
446bdf5f 20402014-03-22 Jakub Jelinek <jakub@redhat.com>
2041
2042 PR debug/60603
2043 * c-opts.c (c_finish_options): Restore cb_file_change call to
2044 <built-in>.
2045
8895f0a3 20462014-03-13 Jakub Jelinek <jakub@redhat.com>
2047
2048 PR middle-end/36282
2049 * c-pragma.c (apply_pragma_weak): Only look at
2050 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
2051 DECL_ASSEMBLER_NAME_SET_P (decl).
2052 (maybe_apply_pending_pragma_weaks): Exit early if
2053 vec_safe_is_empty (pending_weaks) rather than only when
2054 !pending_weaks.
2055 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
2056 set assembler name back to NULL afterwards.
2057
7a5da2cd 20582014-03-11 Jason Merrill <jason@redhat.com>
2059
2060 * c.opt: Add -std=gnu++14.
2061
95093889 20622014-03-11 Ian Bolton <ian.bolton@arm.com>
2063
2064 * c-opts.c (c_common_post_options): Don't override
2065 -ffp-contract=fast if unsafe-math-optimizations is on.
2066
c9a24b37 20672014-03-08 Paulo Matos <paulo@matos-sorge.com>
2068
2069 * c.opt: Enable LTO FE for fshort-double.
2070
3f6dba6e 20712014-03-07 Jason Merrill <jason@redhat.com>
2072
2073 * c.opt: Add -std=c++14.
2074
3bfdc94f 20752014-03-06 Marek Polacek <polacek@redhat.com>
2076
2077 PR c/60197
2078 * cilk.c (contains_cilk_spawn_stmt): New function.
2079 (contains_cilk_spawn_stmt_walker): Likewise.
2080 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
2081 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
2082
8b3a6a4c 20832014-03-03 Jakub Jelinek <jakub@redhat.com>
2084
2085 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
2086 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
2087 even when flag_preprocess_only.
2088
734ec290 20892014-02-26 Jason Merrill <jason@redhat.com>
2090
2091 PR c++/59231
2092 PR c++/11586
2093 * c-common.c (shorten_compare): Don't check
2094 c_inhibit_evaluation_warnings.
2095
81aec8b8 20962014-02-19 Jakub Jelinek <jakub@redhat.com>
2097
d1081017 2098 PR c/37743
2099 * c-common.c (c_common_nodes_and_builtins): When initializing
2100 c_uint{16,32,64}_type_node, also set corresponding
2101 uint{16,32,64}_type_node to the same value.
2102
81aec8b8 2103 PR c++/60267
2104 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
2105 for PRAGMA_IVDEP if flag_preprocess_only.
2106
312243bb 21072014-02-12 Jakub Jelinek <jakub@redhat.com>
2108
2109 PR c/60101
2110 * c-common.c (merge_tlist): If copy is true, call new_tlist,
2111 if false, add ADD itself, rather than vice versa.
2112 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
2113 copy. For SAVE_EXPR, only call merge_tlist once.
2114
237e78b1 21152014-02-08 Jakub Jelinek <jakub@redhat.com>
2116
2117 PR middle-end/60092
2118 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
2119 and tree_to_uhwi.
2120 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
2121 functions.
2122 (c_common_attribute_table): Add alloc_align and assume_aligned
2123 attributes.
2124
76fdceeb 21252014-02-06 Marek Polacek <polacek@redhat.com>
2126
2127 PR c/60087
2128 * c-common.c (warn_for_sign_compare): Call warning_at with location
2129 instead of warning.
2130
4a4dea42 21312014-02-05 Marek Polacek <polacek@redhat.com>
2132
2133 PR c/53123
2134 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
2135 statement.
2136
ec704957 21372014-02-04 Marek Polacek <polacek@redhat.com>
2138
2139 PR c/60036
2140 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
2141 SAVE_EXPR.
2142
caf62483 21432014-02-03 Marc Glisse <marc.glisse@inria.fr>
2144
2145 PR c++/53017
2146 PR c++/59211
2147 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
2148 handle_vector_size_attribute, handle_nonnull_attribute): Call
2149 default_conversion on the attribute argument.
2150 (handle_nonnull_attribute): Increment the argument number.
2151
ec761d5a 21522014-01-31 Marek Polacek <polacek@redhat.com>
2153
2154 PR c/59963
2155 * c-common.c (add_atomic_size_parameter): Pass vNULL to
2156 build_function_call_vec.
2157 (resolve_overloaded_builtin): Likewise.
2158 * c-common.h (build_function_call_vec): Adjust declaration.
2159
22a75734 21602014-01-30 Marek Polacek <polacek@redhat.com>
2161
2162 PR c/59940
2163 * c-common.h (unsafe_conversion_p): Adjust declaration.
2164 (warnings_for_convert_and_check): Likewise.
2165 (convert_and_check): Likewise.
2166 * c-common.c (unsafe_conversion_p): Add location parameter. Call
2167 expansion_point_location_if_in_system_header on it.
2168 (warnings_for_convert_and_check): Add location parameter. Call
2169 expansion_point_location_if_in_system_header on it. Use it.
2170 (convert_and_check): Add location parameter. Use it.
2171 (conversion_warning): Likewise.
2172 (c_add_case_label): Adjust convert_and_check calls.
2173 (scalar_to_vector): Adjust unsafe_conversion_p calls.
2174
a89e6c15 21752014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2176
2177 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
2178 flag_cilkplus.
2179 * c-pragma.c (init_pragma): Likewise.
2180 * c.opt: Likewise.
2181
2623625f 21822014-01-23 Marek Polacek <polacek@redhat.com>
2183
2184 PR c/59846
2185 * c-common.c (shorten_compare): Add location_t parameter.
2186 * c-common.h (shorten_binary_op): Adjust declaration.
2187
46da3601 21882014-01-23 Marek Polacek <polacek@redhat.com>
2189
2190 PR c/58346
2191 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
2192 * c-common.h: Declare it.
2193
c9743c6a 21942014-01-20 Eric Botcazou <ebotcazou@adacore.com>
2195
2196 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
2197 * c-ada-spec.c (dump_ads): Likewise.
2198 (cpp_check): Likewise.
2199 (dump_ada_specs): Likewise.
2200
22012014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
36e33c6a 2202
2203 PR c++/49718
2204 * c-common.c (handle_no_instrument_function_attribute): Allow
2205 no_instrument_function attribute in class member
2206 definition/declaration.
2207
1248c663 22082014-01-15 Jakub Jelinek <jakub@redhat.com>
2209
2210 PR c/58943
2211 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
2212 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
2213 being COMPOUND_EXPR.
2214 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
2215 operand a SAVE_EXPR and second MODIFY_EXPR.
2216
6e5c480b 22172014-01-09 Jakub Jelinek <jakub@redhat.com>
2218
2219 PR target/58115
2220 * c-pch.c (c_common_write_pch): Call
2221 prepare_target_option_nodes_for_pch.
2222
3aea1f79 22232014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2224
2225 Update copyright years
2226
e4f22041 22272014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2228
2229 * array-notation-common.c, c-cilkplus.c: Use the standard form for
2230 the copyright notice.
2231
7fb0fe24 22322013-12-28 Eric Botcazou <ebotcazou@adacore.com>
2233
2234 * c-ada-spec.c (print_constructor): New function.
2235 (print_destructor): Retrieve the origin of the destructor.
2236 (print_ada_declaration): Revamp handling of constructors/destructors.
2237
468088ac 22382013-12-23 Stuart Hastings <stuart@apple.com>
2239 Bill Maddox <maddox@google.com>
2240 Jason Merrill <jason@redhat.com>
2241
2242 * c.opt: Add -fdeclone-ctor-dtor.
2243 * c-opts.c (c_common_post_options): Default to on iff -Os.
2244
74acc703 22452013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2246
2247 * c-common.c (c_common_attribute_table): Added "cilk simd function"
2248 attribute.
2249 * c-pragma.h (enum pragma_cilk_clause): Remove.
2250 (enum pragma_omp_clause): Added the following fields:
2251 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
2252 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
2253 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
2254 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
2255 PRAGMA_CILK_CLAUSE_UNIFORM.
2256
8204c077 2257
433e804e 22582013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2259
2260 * cilk.c (cilk_outline): Made this function non-static.
2261 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
2262 (create_cilk_wrapper): Added a new parameter: a function pointer.
2263 (c_install_body_w_frame_cleanup): Remove
2264 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
2265 * c-common.h (cilk_outline): New prototype.
2266 (gimplify_cilk_spawn): Removed two parameters.
2267 (cilk_install_body_with_frame_cleanup): New prototype.
2268 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
2269 CILK_SPAWN_STMT case.
2270
5bcc7e60 22712013-12-11 Bernd Schmidt <bernds@codesourcery.com>
2272
e66325ea 2273 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
2274
5bcc7e60 2275 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
2276 (int_array_type_node): Remove.
2277 * c-common.c (c_common_nodes_and_builtins): Don't build it.
2278
0b26ec77 22792013-12-05 Marek Polacek <polacek@redhat.com>
2280
2281 PR c/52023
2282 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
2283 [ADJUST_FIELD_ALIGN].
2284
a179a7dc 22852013-12-04 Joseph Myers <joseph@codesourcery.com>
2286
2287 PR c/52023
2288 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
2289 and check field alignment if set.
2290 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
2291 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
2292
8204c077 22932013-12-04 Jakub Jelinek <jakub@redhat.com>
137559b2 2294 Marek Polacek <polacek@redhat.com>
2295
2296 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
2297 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
2298
648fd348 22992013-11-29 H.J. Lu <hongjiu.lu@intel.com>
2300
2301 PR c/59309
2302 * cilk.c (gimplify_cilk_spawn): Properly handle function without
2303 arguments.
2304
253e1cae 23052013-11-29 Jakub Jelinek <jakub@redhat.com>
2306
2307 PR c/59280
2308 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
2309 goto invalid. If it is error_mark_node, don't issue further
2310 diagnostics.
2311
3e398f5b 23122013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
2313
2314 * c.opt (Wopenmp-simd): New.
2315
020bc656 23162013-11-22 Jakub Jelinek <jakub@redhat.com>
2317
2318 * c-ubsan.h (ubsan_instrument_return): New prototype.
2319 * c-ubsan.c (ubsan_instrument_return): New function.
2320
bc61cadb 23212013-11-22 Andrew MacLeod <amacleod@redhat.com>
2322
2323 * c-common.c: Add required include files from gimple.h.
2324 * c-gimplify.c: Likewise
2325 * cilk.c: Likewise
2326
3df42822 23272013-11-22 David Malcolm <dmalcolm@redhat.com>
2328
2329 * c-common.c (unsafe_conversion_p): Remove use of
2330 EXPR_LOC_OR_HERE macro.
2331 (conversion_warning): Likewise.
2332 (warnings_for_convert_and_check): Likewise.
2333 (warn_for_collisions_1): Likewise.
2334 (shorten_compare): Likewise, and remove use of in_system_header
2335 macro, using the location from the former.
2336 * c-lex.c (dump_one_header): Remove use of input_filename macro.
2337 (cb_def_pragma): Remove use of in_system_header macro.
2338 (lex_string): Likewise.
2339 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
2340
8c53c46c 23412013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
2342 Mike Stump <mikestump@comcast.net>
2343 Richard Sandiford <rdsandiford@googlemail.com>
2344
2345 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
2346 instead of TREE_INT_CST_LOW, in cases where there is a protecting
2347 tree_fits_shwi_p or tree_fits_uhwi_p.
2348 (dump_generic_ada_node): Likewise.
2349 * c-format.c (check_format_arg): Likewise.
2350 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2351
5200ef07 23522013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
2353
2354 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
2355
ca9d7d74 23562013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
2357
2358 PR c/53001
2359 * c-common.c (unsafe_conversion_p): Make this function
2360 return an enumeration with more detail.
2361 (conversion_warning): Use the new return type of
2362 unsafe_conversion_p to separately warn either about conversions
2363 that lower floating point number precision or about the other
2364 kinds of conversions.
2365 * c-common.h (enum conversion_safety): New enumeration.
2366 (unsafe_conversion_p): switching return type to
2367 conversion_safety enumeration.
2368 * c.opt: Adding new warning -Wfloat-conversion and
2369 enabling it with -Wconversion.
2370
0391a567 23712013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
2372
2373 * c-opts.c: Include plugin.h.
2374 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
2375
19b928d9 23762013-11-19 Marek Polacek <polacek@redhat.com>
2377
2378 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
2379 call.
2380 (ubsan_instrument_shift): Likewise.
2381 (ubsan_instrument_vla): Likewise.
2382
aa59f000 23832013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2384
2385 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
2386 cast to unsigned type.
2387
08f817b3 23882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2389
2390 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
2391 tree_low_cst.
2392 (complete_array_type): Update comment to refer to tree_to_[su]hwi
2393 rather than tree_low_cst.
2394
6a0712d4 23952013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2396
2397 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
2398 tree_to_uhwi throughout.
2399
fcb97e84 24002013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2401
2402 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
2403 tree_low_cst (..., 0) with tree_to_shwi throughout.
2404
cd4547bf 24052013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2406
2407 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
2408 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
2409
35ec552a 24102013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2411
2412 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
2413 host_integerp (..., 0) with tree_fits_shwi_p throughout.
2414
f2697631 24152013-11-15 Aldy Hernandez <aldyh@redhat.com>
2416
2417 * c-cilkplus.c: New file.
2418 * c-common.c (readonly_error): Add location argument.
2419 * c-common.h (readonly_error): Same.
2420 (c_finish_cilk_clauses): Protoize.
2421 (c_check_cilk_loop): Same.
2422 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
2423 Do not fail on error_mark_node.
2424 Abstract increment canonicalization to here...
2425 (c_omp_for_incr_canonicalize_ptr): New.
2426 c-pragma.c (init_pragma): Register "simd" pragma.
2427 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
2428 (enum pragma_cilk_clause): New.
2429
0aa8c34e 24302013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
2431
2432 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
2433 wchar_type and host_integerp checks.
2434
e795d6e1 24352013-11-14 Andrew MacLeod <amacleod@redhat.com>
2436
2437 * c-common.c: Likewise.
2438 * c-gimplify.c: Likewise.
2439 * cilk.c: Likewise.
2440
9ed99284 24412013-11-14 Diego Novillo <dnovillo@google.com>
2442
2443 * c-common.c: Include fold-const.h.
2444 Include stor-layout.h.
2445 Include calls.h.
2446 Include stringpool.h.
2447 Include attribs.h.
2448 Include varasm.h.
2449 Include trans-mem.h.
2450 * c-cppbuiltin.c: Include stor-layout.h.
2451 Include stringpool.h.
2452 * c-format.c: Include stringpool.h.
2453 * c-lex.c: Include stringpool.h.
2454 Include stor-layout.h.
2455 * c-pragma.c: Include stringpool.h.
2456 Include attribs.h.
2457 Include varasm.h.
2458 Include gcc-symtab.h.
2459 * c-pretty-print.c: Include stor-layout.h.
2460 Include attribs.h.
2461 * cilk.c: Include stringpool.h.
2462 Include calls.h.
2463
4fba5eb9 24642013-11-13 Joseph Myers <joseph@codesourcery.com>
2465
2466 * c-common.h (enum rid): Add RID_AUTO_TYPE.
2467 * c-common.c (c_common_reswords): Add __auto_type.
2468 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
2469
a8783bee 24702013-11-12 Andrew MacLeod <amacleod@redhat.com>
2471
e795d6e1 2472 * c-common.c: Include gimplify.h.
2473 * c-gimplify.c: Likewise.
2474 * cilk.c: Likewise.
2475 * c-omp.c: Include gimple-expr.h instead of gimple.h.
2476 * c-ubsan.c: Don't include gimple.h.
a8783bee 2477
d184e0c0 24782013-11-12 Joseph Myers <joseph@codesourcery.com>
2479
2480 * c-common.c (c_common_reswords): Add _Thread_local.
2481
a056826c 24822013-11-09 Joseph Myers <joseph@codesourcery.com>
2483
2484 * c-common.c (atomic_size_supported_p): New function.
2485 (resolve_overloaded_atomic_exchange)
2486 (resolve_overloaded_atomic_compare_exchange)
2487 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
2488 Use it instead of comparing size with a local list of sizes.
2489
b560fabd 24902013-11-07 Andrew MacLeod <amacleod@redhat.com>
2491 Joseph Myers <joseph@codesourcery.com>
2492
2493 * c-common.h (enum rid): Add RID_ATOMIC.
2494 * c-common.c (c_common_reswords): Add _Atomic.
2495 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
2496 (keyword_is_type_qualifier): Accept RID_ATOMIC.
2497 * c-format.c (check_format_types): Check for extra _Atomic
2498 qualifiers in format argument.
2499 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
2500 (pp_c_type_qualifier_list): Mention _Atomic in comment.
2501
5b1a0622 25022013-11-06 Tobias Burnus <burnus@net-b.de>
2503
2504 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
2505
4f8f4cb8 25062013-11-06 Joseph Myers <joseph@codesourcery.com>
2507
2508 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
2509 standards modes.
2510 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
2511 to mean lack of IEEE 754 support.
2512
9148bda3 25132013-11-05 Tobias Burnus <burnus@net-b.de>
2514
2515 * c.opt (-Wdate-time): New option
2516 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
2517
08c5f4d5 25182013-11-05 Joseph Myers <joseph@codesourcery.com>
2519
2520 * c-cppbuiltin.c (cpp_iec_559_value): Test
2521 flag_excess_precision_cmdline not flag_excess_precision.
2522
c630ef93 25232013-11-05 Tobias Burnus <burnus@net-b.de>
2524
2525 * c.opt (fopenmp-simd): New option.
2526 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
2527 (omp_pragmas): ... this new struct.
2528 (c_pp_lookup_pragma): Also walk omp_pragmas.
2529 (init_pragma): Init pragmas for -fopenmp-simd.
2530
7354a89b 25312013-11-04 Marek Polacek <polacek@redhat.com>
2532
2533 PR c++/58979
2534 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
2535
4c866b9b 25362013-11-04 Joseph Myers <joseph@codesourcery.com>
2537
2538 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
2539 New functions.
2540 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
2541
e2a6a333 25422013-11-04 Eric Botcazou <ebotcazou@adacore.com>
2543
2544 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
2545 (dump_ada_specs): Adjust prototype of second callback.
2546 * c-ada-spec.c (cpp_check): New global variable.
2547 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
2548 (print_generic_ada_decl): Likewise.
2549 (has_static_fields): Change return type to bool and add guard.
2550 (has_nontrivial_methods): New predicate.
2551 (is_tagged_type): Change return type to bool.
2552 (separate_class_package): Call has_nontrivial_methods.
2553 (pp_ada_tree_identifier): Minor tweaks.
2554 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
2555 (dump_ada_array_domains): Likewise.
2556 (dump_ada_array_type): Likewise.
2557 (dump_template_types): Remove cpp_check parameter and do not pass it to
2558 dump_generic_ada_node.
2559 (dump_ada_template): Likewise.
2560 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
2561 recursively.
2562 (print_ada_methods): Change return type to integer. Remove cpp_check
2563 parameter and do not pass it down.
2564 (dump_nested_types): Remove cpp_check parameter and do not pass it to
2565 dump_generic_ada_node.
2566 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
2567 accessing methods.
2568 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
2569 down. Use has_nontrivial_methods to recognize C++ classes. Use return
2570 value of print_ada_methods.
2571 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
2572 Set cpp_check to it before invoking dump_ada_nodes.
2573 (dump_ada_specs): Likewise.
2574
2c4c3477 25752013-11-03 Marek Polacek <polacek@redhat.com>
2576
2577 * c-ubsan.c: Don't include hash-table.h.
2578 (ubsan_instrument_vla): New function.
2579 * c-ubsan.h: Declare it.
2580
452659af 25812013-10-31 David Malcolm <dmalcolm@redhat.com>
2582
2583 Automated part of renaming of symtab_node_base to symtab_node.
2584
2585 Patch autogenerated by rename_symtab.py from
2586 https://github.com/davidmalcolm/gcc-refactoring-scripts
2587 revision 58bb219cc090b2f4516a9297d868c245495ee622
2588
2589 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
2590 symtab_node_base to symtab_node.
2591
4d6f7dd4 25922013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
2593
2594 Implement C++14 digit separators.
2595 * c-lex.c (interpret_float): Remove digit separators from scratch string
2596 before building real literal.
2597
06cfe805 25982013-10-30 Jakub Jelinek <jakub@redhat.com>
2599
2600 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
2601
d037099f 26022013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2603
2604 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
2605 fields.
2606 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
2607 enabled.
2608 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
2609 (insert_cilk_frame): New prototype.
2610 (cilk_init_builtins): Likewise.
2611 (gimplify_cilk_spawn): Likewise.
2612 (c_cilk_install_body_w_frame_cleanup): Likewise.
2613 (cilk_detect_spawn_and_unwrap): Likewise.
2614 (cilk_set_spawn_marker): Likewise.
2615 (build_cilk_sync): Likewise.
2616 (build_cilk_spawn): Likewise.
2617 * cilk.c: New file.
2618
02774f2d 26192013-10-29 David Malcolm <dmalcolm@redhat.com>
2620
2621 Patch autogenerated by refactor_symtab.py from
2622 https://github.com/davidmalcolm/gcc-refactoring-scripts
2623 revision 58bb219cc090b2f4516a9297d868c245495ee622
2624
2625 * c-gimplify.c (c_genericize): Update for conversion of symtab types
2626 to a true class hierarchy.
2627 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
2628
31fe10fd 26292013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
2630
2631 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
2632
b1c06ff9 26332013-10-26 Jeff Law <law@redhat.com>
2634
1f78217c 2635 * c-common.c (c_define_builtins): Remove mudflap support.
2636 * c.opt: Ignore and warn for mudflap options.
b1c06ff9 2637
48a972c8 26382013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 2639
2640 PR other/33426
2641 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
2642 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
2643
546a04b1 26442013-10-23 Jason Merrill <jason@redhat.com>
2645
2646 * c-format.c (gcc_cxxdiag_char_table): Add %X.
2647
bc7bff74 26482013-10-11 Jakub Jelinek <jakub@redhat.com>
2649
d62c713e 2650 * c-common.h (omp_clause_mask::operator !=): New method.
2651 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
2652 instead of if (mask & something) tests everywhere.
2653
bc7bff74 2654 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
2655 201307 instead of 201107.
2656 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
2657 (c_common_attribute_table): Add "omp declare target" and
2658 "omp declare simd" attributes.
2659 (handle_omp_declare_target_attribute,
2660 handle_omp_declare_simd_attribute): New functions.
2661 * c-omp.c: Include c-pragma.h.
2662 (c_finish_omp_taskgroup): New function.
2663 (c_finish_omp_atomic): Add swapped argument, if true,
2664 build the operation first with rhs, lhs arguments and use NOP_EXPR
2665 build_modify_expr.
2666 (c_finish_omp_for): Add code argument, pass it down to make_code.
2667 (c_omp_split_clauses): New function.
2668 (c_split_parallel_clauses): Removed.
2669 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
2670 c_omp_declare_simd_clauses_to_decls): New functions.
2671 * c-common.h (omp_clause_mask): New type.
2672 (OMP_CLAUSE_MASK_1): Define.
2673 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
2674 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
2675 omp_clause_mask::operator |, omp_clause_mask::operator &,
2676 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
2677 omp_clause_mask::operator ==): New methods.
2678 (enum c_omp_clause_split): New.
2679 (c_finish_omp_taskgroup): New prototype.
2680 (c_finish_omp_atomic): Add swapped argument.
2681 (c_finish_omp_for): Add code argument.
2682 (c_omp_split_clauses): New prototype.
2683 (c_split_parallel_clauses): Removed.
2684 (c_omp_declare_simd_clauses_to_numbers,
2685 c_omp_declare_simd_clauses_to_decls): New prototypes.
2686 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
2687 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
2688 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
2689 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
2690 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
2691 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
2692 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
2693 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
2694 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
2695 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
2696 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
2697 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
2698 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
2699 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
2700 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
2701 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
2702 PRAGMA_OMP_CLAUSE_UNIFORM.
2703
d7dcba40 27042013-10-09 Marc Glisse <marc.glisse@inria.fr>
2705
2706 PR tree-optimization/20318
2707 * c-common.c (handle_returns_nonnull_attribute): New function.
2708 (c_common_attribute_table): Add returns_nonnull.
2709
0b7282f1 27102013-10-03 Marc Glisse <marc.glisse@inria.fr>
2711
2712 PR c++/19476
2713 * c.opt (fcheck-new): Move to common.opt.
2714
51f553af 27152013-09-25 Marek Polacek <polacek@redhat.com>
2716 Jakub Jelinek <jakub@redhat.com>
2717
2718 PR sanitizer/58413
2719 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
2720 an expression if we can prove it is correct.
2721 (ubsan_instrument_division): Likewise. Remove unnecessary
2722 check.
2723
05f893e1 27242013-09-18 Marek Polacek <polacek@redhat.com>
2725
2726 PR sanitizer/58411
2727 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
2728 Declare it.
2729 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
2730
236ce1d1 27312013-09-14 Iain Sandoe <iain@codesourcery.com>
2732
2733 PR target/48094
2734 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
2735 fobjc-gc, freplace-objc-classes): Accept for LTO.
2736
f9f68d35 27372013-09-13 Jacek Caban <jacek@codeweavers.com>
2738
2739 * c-target.def: New hook
2740
ba2f764e 27412013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
2742
2743 PR c++/43452
2744 * c.opt (Wdelete-incomplete): Add.
2745
73437615 27462013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2747
2748 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
2749 (vector_types_compatible_elements_p): New function.
2750 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
2751 declaration.
2752 (vector_types_compatible_elements_p): Declare.
2753
95af4c75 27542013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2755
2756 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
2757 a virtual member function.
2758 (pp_simple_type_specifier): Remove.
2759 (pp_c_type_specifier): Likewise.
2760 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2761 Rename from pp_c_type_specifier. Adjust.
2762 (c_pretty_printer::c_pretty_printer): Do not assign to
2763 simple_type_specifier.
2764
eaab24b9 27652013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2766
2767 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
2768 member function.
2769 (c_pretty_printer::storage_class_specifier): Likewise.
2770 (c_pretty_printer::initializer): Likewise.
2771 (pp_declaration): Remove.
2772 (pp_declaration_specifiers): Likewise.
2773 (pp_abstract_declarator): Likewise.
2774 (pp_declarator): Likewise.
2775 (pp_type_id): Likewise.
2776 (pp_statement): Likewise.
2777 (pp_constant): Likewise.
2778 (pp_id_expression): Likewise.
2779 (pp_primary_expression): Likewise.
2780 (pp_unary_expression): Likewise.
2781 (pp_multiplicative_expression): Likewise.
2782 (pp_conditional_expression): Likewise.
2783 (pp_assignment_expression): Likewise.
2784 (pp_expression): Likewise.
2785 (pp_c_type_id): Likewise.
2786 (pp_c_storage_class_specifier): Likewise.
2787 * c-pretty-print.c (pp_c_type_cast): Tidy.
2788 (pp_c_pointer): Likewise.
2789 (pp_c_type_specifier): Likewise.
2790 (pp_c_parameter_type_list): Likewise.
2791 (pp_c_function_definition): Likewise.
2792 (pp_c_init_declarator): Likewise.
2793 (pp_c_initializer_list): Likewise.
2794 (pp_c_constructor_elts): Likewise.
2795 (c_pretty_printer::direct_abstract_declarator): Likewise.
2796 (c_pretty_printer::declaration_specifiers): Likewise.
2797 (c_pretty_printer::primary_expression): Likewise.
2798 (c_pretty_printer::postfix_expression): Likewise.
2799 (c_pretty_printer::type_id): Rename from pp_c_type_id.
2800 (c_pretty_printer::storage_class_specifier): Rename from
2801 pp_c_storage_class_specifier.
2802 (c_pretty_printer::initializer): Rename from pp_c_initializer.
2803 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
2804 storage_class_specifier, initializer, offset_list, flags.
2805
9e46467d 28062013-08-30 Marek Polacek <polacek@redhat.com>
2807
2808 * c-ubsan.c: New file.
2809 * c-ubsan.h: New file.
2810
36a8d9b9 28112013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2812
2813 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
2814 member function.
2815 (c_pretty_printer::declaration_specifiers): Likewise.
2816 (c_pretty_printer::declarator): Likewise.
2817 (c_pretty_printer::abstract_declarator): Likewise.
2818 (c_pretty_printer::direct_abstract_declarator): Likewise.
2819 (c_pretty_printer::direct_declarator): Likewise.
2820 (c_pretty_printer::function_specifier): Likewise.
2821 (pp_declaration): Adjust.
2822 (pp_declaration_specifiers): Likewise.
2823 (pp_abstract_declarator): Likewise.
2824 (pp_direct_declarator): Likewise.
2825 (pp_function_specifier): Likewise.
2826 (pp_direct_abstract_declarator): Remove as unused.
2827 (pp_c_declaration): Remove.
2828 (pp_c_declaration_specifiers): Likewise.
2829 (pp_c_declarator): Likewise.
2830 (pp_c_direct_declarator): Likewise.
2831 (pp_c_function_specifier): Likewise.
2832 (pp_c_direct_abstract_declarator): Likewise.
2833 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
2834 from pp_c_abstract_declarator. Adjust.
2835 (c_pretty_printer::direct_abstract_declarator): Rename from
2836 pp_c_direct_abstract_declarator. Adjust.
2837 (c_pretty_printer::function_specifier): Rename from
2838 pp_c_function_specifier. Adjust.
2839 (c_pretty_printer::declaration_specifiers): Rename from
2840 pp_c_declaration_specifiers. Adjust.
2841 (c_pretty_printer::direct_declarator): Rename from
2842 pp_c_direct_declarator. Adjust.
2843 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
2844 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
2845 (c_pretty_printer::c_pretty_printer): Do not assign to
2846 declaration, declaration_specifiers, declarator,
2847 direct_declarator, direct_abstract_declarator, function_specifier.
2848
30635c2e 28492013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
2850
2851 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
2852 virtual member function.
2853 (c_pretty_printer::multiplicative_expression): Likewise.
2854 (c_pretty_printer::conditional_expression): Likewise.
2855 (c_pretty_printer::assignment_expression): Likewise.
2856 (c_pretty_printer::expression): Likewise.
2857 (pp_unary_expression): Adjust.
2858 (pp_multiplicative_expression): Likewise.
2859 (pp_assignment_expression): Likewise.
2860 (pp_conditional_expression): Likewise.
2861 (pp_expression): Likewise.
2862 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
2863 from pp_c_unary_expression. Adjust.
2864 (c_pretty_printer::multiplicative_expression): Rename from
2865 pp_c_multiplicative_expression. Adjust.
2866 (c_pretty_printer::conditional_expression): Rename from
2867 pp_c_conditional_expression. Adjust.
2868 (c_pretty_printer::assignment_expression): Rename from
2869 pp_c_assignment_expression. Adjust.
2870 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
2871 (c_pretty_printer::c_pretty_printer): Do not assign to
2872 unary_expression, multiplicative_expression,
2873 conditional_expression, expression.
2874
027d08ed 28752013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2876
2877 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
2878 virtual member function.
2879 (pp_postfix_expression): Adjust.
2880 (pp_c_postfix_expression): Remove.
2881 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
2882 from pp_c_postfix_expression. Adjust.
2883 (c_pretty_printer::c_pretty_printer): Do not assign to
2884 postfix_expression.
2885
f873303a 28862013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2887
2888 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
2889 virtua member function.
2890 (pp_primary_expression): Adjust.
2891 (pp_c_primary_expression): Remove.
2892 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
2893 from pp_c_primary_expression. Adjust.
2894 (pp_c_initializer_list): Use pp_primary_expression.
2895 (c_pretty_printer::c_pretty_printer): Do not assign to
2896 primary_expression.
2897
08e3e481 28982013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2899
2900 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
2901 * c-pretty-print.c (M_): Remove.
2902 (c_pretty_printer::translate_string): Define.
2903 (pp_c_type_specifier): Use it.
2904 (pp_c_primary_expression): Likewise.
2905 (pp_c_expression): Likewise.
2906
1fc4a87f 29072013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
2908
2909 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
2910 virtual function.
2911 (pp_c_id_expression): Remove.
2912 (pp_id_expression): Adjust.
2913 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
2914 pp_c_id_expression. Adjust.
2915 (pp_c_postfix_expression): Use pp_id_expression.
2916 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
2917
a6cb161b 29182013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
2919
2920 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
2921 member function.
2922 (pp_constant): Adjust.
2923 (pp_c_constant): Remove.
2924 * c-pretty-print.c (c_pretty_printer::constant): Rename from
2925 pp_c_constant. Adjust.
2926 (pp_c_constant)
2927 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
2928 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
2929
eed6bc21 29302013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2931
2932 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
2933 (c_pretty_printer::c_pretty_printer): Declare.
2934 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
2935 c_pretty_printer_init. Adjust.
2936 (print_c_tree): Do not call c_pretty_printer_init.
2937 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
2938
df558d2e 29392013-08-09 Arnaud Charlet <charlet@adacore.com>
2940
2941 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
2942
42f9a786 29432013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
2944
2945 PR c++/58080
2946 * c-common.c (pointer_int_sum): Add bool parameter.
2947 * c-common.h (pointer_int_sum): Adjust declaration.
2948
f874ddad 29492013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2950
2951 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
2952 c_pretty_printer variable.
2953
a94db6b0 29542013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2955
2956 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
2957 (pp_base): Remove.
2958 (pp_c_base): Likewise. Adjust users.
2959 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
2960 (pp_c_whitespace): Do not call pp_base.
2961 (pp_c_left_paren): Likewise.
2962 (pp_c_right_paren): Likewise.
2963 (pp_c_left_brace): Likewise.
2964 (pp_c_right_brace): Likewise.
2965 (pp_c_left_bracket): Likewise.
2966 (pp_c_right_bracket): Likewise.
2967 (pp_c_dot): Likewise.
2968 (pp_c_ampersand): Likewise.
2969 (pp_c_star): Likewise.
2970 (pp_c_arrow): Likewise.
2971 (pp_c_semicolon): Likewise.
2972 (pp_c_complement): Likewise.
2973 (pp_c_exclamation): Likewise.
2974 (pp_c_direct_declarator): Likewise.
2975 (pp_c_ws_string): Likewise.
2976 (pp_c_identifier): Likewise.
2977 (pp_c_statement): Likewise.
2978 (print_c_tree): Likewise.
2979
1898176c 29802013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
2981
2982 PR c++/58072
2983 * c-common.c (c_parse_error): Catch user-defined literal tokens and
2984 provide useful error strings.
2985
70d60d1d 29862013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2987
2988 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
2989 printer functions instead of pp_string or operators and punctuators.
2990 (dump_generic_ada_node): Likewise.
2991 * c-pretty-print.c (pp_c_type_specifier): Likewise.
2992 (pp_c_relational_expression): Likewise.
2993 (pp_c_logical_or_expression): Likewise.
2994
dda4f0ec 29952013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2996
2997 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
2998 functions instead of pp_character.
2999 (pp_ada_tree_identifier): Likewise.
3000 (dump_ada_double_name): Likewise.
3001 (dump_ada_function_declaration): Likewise.
3002 (dump_ada_array_domains): Likewise.
3003 (dump_template_types): Likewise.
3004 (dump_generic_ada_node): Likewise.
3005 (print_ada_declaration): Likewise.
3006 (print_ada_struct_decl): Likewise.
3007 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3008
7aa04c8d 30092013-07-23 Tom Tromey <tromey@redhat.com>
3010
3011 * c-common.h (enum rid) <RID_GENERIC>: New constant.
3012 * c-common.c (c_common_reswords): Add _Generic.
3013
a04e8d62 30142013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
3015
3016 * c-common.c: Fix typos.
3017 * c-common.h: Likewise.
3018
a96c3cc1 30192013-07-13 Lubos Lunak <l.lunak@suse.cz>
3020
3021 PR c++/55203
3022 * c-common.c (c_common_attribute_table): Add warn_unused.
3023 (handle_warn_unused_attribute): New.
3024
da31536d 30252013-07-10 Jakub Jelinek <jakub@redhat.com>
3026
3027 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
3028 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
3029
839f2f70 30302013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
3031
3032 PR c++/57869
3033 * c.opt: Add Wconditionally-supported.
3034
73f353d0 30352013-07-08 Graham Stott <graham.stott@btinternet.com>
3036
1f78217c 3037 * array-notation-common.c (length_mismatch_in_expr_p): Delete
73f353d0 3038 unused variables l_length and l_node.
3039
21ebaa24 30402013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 3041
3042 PR c/57821
3043 * c-common.c (complete_array_type): Delay folding first index
3044 like other indices. When folding, check for index overflow.
3045
68ea4406 30462013-06-27 Marc Glisse <marc.glisse@inria.fr>
3047
3048 PR c++/57509
3049 * c-common.h (c_build_vec_perm_expr): New complain argument.
3050 * c-common.c (c_build_vec_perm_expr): Likewise.
3051 Use save_expr also in C++.
3052
60777f69 30532013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3054
3055 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
3056 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3057 * c-opts.c (c_common_post_options): Likewise.
3058
839f2f70 30592013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
50acebe0 3060
3061 * array-notation-common.c (length_mismatch_in_expr): Changed the
3062 parameter type's from a dynamic array to a vec_tree. Also removed
3063 the size parameters.
3064 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
3065 the change above.
3066
e9331eab 30672013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3068
3069 * c-common.h (struct cilkplus_an_parts): New structure.
3070 (struct cilkplus_an_loop_parts): Likewise.
3071 (cilkplus_extract_an_triplets): New prototype.
3072 (fix_sec_implicit_args): Likewise.
3073 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
3074 (fix_sec_implicit_args): Likewise.
60777f69 3075
a9c99fc4 30762013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
3077
3078 * array-notation-common.c (find_inv_trees): Removed an unwanted
3079 typecasting.
3080 * c-common.h (struct inv_list::additional_tcodes): Changed type from
3081 enum rid to enum tree_code.
3082
f2526cce 30832013-06-11 Jan Hubicka <jh@suse.cz>
3084
3085 * c-common.c (handle_alias_ifunc_attribute): Do not set
3086 DECL_EXTERNAL for weakref variables.
3087 * c-pragma.c (handle_pragma_weak): Make sure aliases
3088 are not declared as external.
3089
09970d67 30902013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3091
3092 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
3093 function from c/c-array-notation.c.
3094 (is_cilkplus_reduce_builtin): Likewise.
3095 (find_rank): Likewise.
3096 (extract_array_notation_exprs): Likewise.
3097 (replace_array_notations): Likewise.
3098 (find_inv_trees): Likewise.
3099 (replace_inv_trees): Likewise.
3100 (contains_array_notation_expr): Likewise.
3101 (find_correct_array_notation_type): Likewise.
3102 * c-common.h (struct inv_list): Moved this struct from the file
3103 c/c-array-notation.c and added a new field called additional tcodes.
3104 (length_mismatch_in_expr_p): New prototype.
3105 (is_cilkplus_reduce_builtin): Likewise.
3106 (find_rank): Likewise.
3107 (extract_array_notation_exprs): Likewise.
3108 (replace_array_notation): Likewise.
3109 (find_inv_trees): Likewise.
3110 (replace_inv_trees): Likewise.
3111 (find_correct_array_notation_type): Likewise.
839f2f70 3112
3c6d4197 31132013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3114
3115 * c-common.c (c_define_builtins): When cilkplus is enabled, the
3116 function array_notation_init_builtins is called.
3117 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
3118 * c-common.def (ARRAY_NOTATION_REF): New tree.
3119 * c-common.h (build_array_notation_expr): New function declaration.
3120 (build_array_notation_ref): Likewise.
3121 (extract_sec_implicit_index_arg): New extern declaration.
3122 (is_sec_implicit_index_fn): Likewise.
3123 (ARRAY_NOTATION_CHECK): New define.
3124 (ARRAY_NOTATION_ARRAY): Likewise.
3125 (ARRAY_NOTATION_START): Likewise.
3126 (ARRAY_NOTATION_LENGTH): Likewise.
3127 (ARRAY_NOTATION_STRIDE): Likewise.
3128 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
3129 ARRAY_NOTATION_REF.
3130 (pp_c_expression): Likewise.
3131 * c.opt (flag_enable_cilkplus): New flag.
3132 * array-notation-common.c: New file.
3133
8e71dad2 31342013-05-14 Jakub Jelinek <jakub@redhat.com>
3135
3136 PR c++/57274
3137 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
3138
432dd330 31392013-05-10 Marc Glisse <marc.glisse@inria.fr>
3140
3141 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
3142 vectors.
3143
b156ec37 31442013-05-07 Han Shen <shenhan@google.com>
3145
3146 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
3147
1a087624 31482013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3149
3150 * c-common.c (check_user_alignment): Emit error for negative values.
3151
1638c736 31522013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3153
3154 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
3155
949dbf93 31562013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3157
3158 * c-cppbuiltin.c (c_cpp_builtins): Do not define
3159 __GXX_EXPERIMENTAL_CXX1Y__.
3160
9205a6cc 31612013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3162 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3163
3164 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
3165 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
3166 to simply use OPT_Wpointer_arith.
3167 (c_sizeof_or_alignof_type): Likewise.
3168
05d0bce1 31692013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3170
3171 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
3172
41609f8b 31732013-04-12 Jakub Jelinek <jakub@redhat.com>
3174
3175 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
3176 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
3177 specifiers.
3178
c671dc4f 31792013-04-07 Steven Bosscher <steven@gcc.gnu.org>
3180
3181 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
3182
ba125576 31832013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
3184
3185 * c-common.c (pointer_int_sum): Remove dead code.
3186
9d3fa937 31872013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
3188
3189 PR middle-end/56524
3190 * c-common.c (handle_optimize_attribute): Don't call
3191 save_optabs_if_changed.
3192
5ceebb21 31932013-03-05 Jakub Jelinek <jakub@redhat.com>
3194
3195 PR middle-end/56461
3196 * c-pch.c (pch_init): Free target_validity at the end.
3197
18eeed2b 31982013-03-04 Jakub Jelinek <jakub@redhat.com>
3199
3200 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
3201
a9196da9 32022013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
3203 Jakub Jelinek <jakub@redhat.com>
3204
3205 PR sanitizer/56454
3206 * c-common.c (handle_no_sanitize_address_attribute): New function.
3207 (c_common_attribute_table): Add no_sanitize_address attribute.
3208 (handle_no_address_safety_analysis_attribute): Add
3209 no_sanitize_address attribute, not no_address_safety_analysis
3210 attribute.
3211
15c27dda 32122013-02-18 Aldy Hernandez <aldyh@redhat.com>
08c7d04b 3213
3214 PR target/52555
3215 * c-common.c (handle_optimize_attribute): Call
3216 save_optabs_if_changed.
3217
19426fe1 32182013-02-18 Jakub Jelinek <jakub@redhat.com>
3219 Steven Bosscher <steven@gcc.gnu.org>
3220
3221 PR pch/54117
3222 * c-opts.c (c_common_post_options): If debug info is enabled
3223 and non-dwarf*, refuse to load PCH files and when writing PCH
3224 file warn.
3225
df936998 32262013-02-05 Jakub Jelinek <jakub@redhat.com>
3227
3228 PR middle-end/56167
3229 * c-common.c (handle_error_attribute): Fix condition.
3230
ae0c3984 32312013-01-30 Jakub Jelinek <jakub@redhat.com>
3232
3233 PR c++/55742
3234 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
3235
1c4973d7 32362013-01-18 Jason Merrill <jason@redhat.com>
3237
3238 PR target/54908
3239 * c.opt (-fextern-tls-init): New.
3240 * c-opts.c (c_common_post_options): Handle it.
3241
7c834436 32422013-01-09 Jakub Jelinek <jakub@redhat.com>
3243
3244 PR c/48418
3245 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
3246 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
3247 and is either negative or bigger or equal to type precision
3248 of the first operand.
3249
5abaa10a 32502012-12-03 Marek Polacek <polacek@redhat.com>
3251
3252 PR c/55570
3253 * c-common.c (check_user_alignment): Swap order of tests,
3254 check TREE_CODE first.
3255
324ca377 32562012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
3257
3258 PR c++/52654
3259 * c-common.h (overflow_type): New enum.
3260 (build_userdef_literal): Add overflow_type argument.
3261 (tree_userdef_literal): Add overflow_type.
3262 (USERDEF_LITERAL_OVERFLOW): New access macro.
3263 * c-common.c (build_userdef_literal): Add overflow_type
3264 argument.
3265 * c-lex.c (c_lex_with_flags): Add overflow_type to
3266 build_userdef_literal calls.
3267 (interpret_integer, interpret_float): Add overflow_type argument.
3268
b4c4a429 32692012-11-28 Richard Biener <rguenther@suse.de>
3270
3271 PR c/35634
3272 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
3273 here and use a type with proper overflow behavior for types that would
3274 need to be promoted for the arithmetic.
3275
d413ffdd 32762012-11-23 Jakub Jelinek <jakub@redhat.com>
3277
3278 PR sanitizer/55435
3279 * c-common.c (handle_no_address_safety_analysis_attribute): New
3280 function.
3281 (c_common_attribute_table): Add no_address_safety_analysis.
3282
52bc861d 32832012-11-16 Simon Baldwin <simonb@google.com>
3284
3285 * c.opt: Add f[no-]canonical-system-headers.
3286 * c-opts.c (c_common_handle_option): Handle
3287 OPT_fcanonical_system_headers.
3288
2dd00636 32892012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
3290
3291 PR c++/54413
3292 * c-opts.c (c_common_handle_option): Set new flags.
3293 * c.opt: Describe new flags.
3294
d4701f6c 32952012-11-09 Jason Merrill <jason@redhat.com>
3296
3297 * c.opt (Wabi-tag): New.
3298
72d65da9 32992012-11-09 Andi Kleen <ak@linux.intel.com>
3300
3301 PR 55139
3302 * c-common.c (get_atomic_generic_size): Mask with
3303 MEMMODEL_MASK
3304
77a357e3 33052012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
3306
3307 PR c/53063
3308 * c.opt (Wformat): Make it Alias Wformat=1.
3309 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
3310 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
3311 LangEnabledBy.
3312 (Wformat=): RejectNegative. Use LangEnabledBy.
3313 (Wnonnull): Use LangEnabledBy.
3314 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
3315 * c-format.c (set_Wformat): Delete.
3316 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
3317 (maybe_read_dollar_number): Likewise.
3318 (avoid_dollar_number): Likewise.
3319 (finish_dollar_format_checking): Likewise.
3320 (check_format_info): Likewise.
3321 (check_format_info_main): Likewise.
3322 (check_format_types): Likewise.
3323 (format_type_warning): Likewise.
3324 * c-common.c (int): Likewise.
3325 (check_function_sentinel): Likewise.
3326 * c-common.h (warn_format,set_Wformat): Do not declare here.
3327
45efa6b9 33282012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
3329
3330 PR c/53063
3331 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
3332 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
3333 Use LangEnabledBy.
3334 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
3335 common.opt.
3336 (Wvariadic-macros): Init(1).
3337 * c-opts.c (c_common_handle_option): Do not handle them
3338 explicitly.
3339 (c_common_post_options): Likewise.
3340 (sanitize_cpp_opts): warn_unused_macros is now
3341 cpp_warn_unused_macros.
3342 (push_command_line_include): Likewise.
3343 * c-common.c (warn_unknown_pragmas): Do not define.
3344 * c-common.h (warn_unknown_pragmas): Do not declare.
3345
0e4e775a 33462012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
3347
3348 PR c/51294
3349 * c-common.c (conversion_warning): Handle conditional expressions.
3350
8b447d3f 33512012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3352
3353 PR c++/54930
3354 * c.opt (Wreturn_local_addr): Define new option.
3355
f4a61754 33562012-10-25 Jason Merrill <jason@redhat.com>
3357
ecb10e6a 3358 * c.opt (Wvirtual-move-assign): New.
3359
f4a61754 3360 * c.opt (Winherited-variadic-ctor): New.
3361
7b463b19 33622012-10-25 Marc Glisse <marc.glisse@inria.fr>
3363
3364 PR c++/54427
3365 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
3366
6adc88f8 33672012-10-23 Joseph Myers <joseph@codesourcery.com>
3368
3369 * c-common.h (pch_cpp_save_state): Declare.
3370 * c-target.def (c_preinclude): New hook.
3371 * c-opts.c (done_preinclude): New.
3372 (push_command_line_include): Handle default preincluded header.
3373 (cb_file_change): Call pch_cpp_save_state when calling
3374 push_command_line_include.
3375 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
3376 (pch_cpp_save_state): New.
3377 (pch_init): Call pch_cpp_save_state conditionally, instead of
3378 calling cpp_save_state.
3379
fa816b0b 33802012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3381
3382 PR c/53063
3383 PR c/40989
3384 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
3385 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
3386 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
3387 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
3388 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
3389 * c-opts.c (c_common_handle_option): Remove explicit handling from
3390 here.
3391 (c_common_post_options): Likewise.
3392
d214ccee 33932012-10-18 Eric Botcazou <ebotcazou@adacore.com>
3394
3395 * c-ada-spec.c (LOCATION_COL): Delete.
3396 (compare_location): New function.
3397 (compare_node): Use it.
3398 (compare_comment): Likewise.
3399
77b27208 34002012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3401
3402 PR c/53063
3403 PR c/40989
3404 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
3405 * c-opts.c (c_common_handle_option): Do not set them here. Add
3406 comment.
3407 (c_common_post_options): Likewise.
3408
cc02ca4d 34092012-10-16 Eric Botcazou <ebotcazou@adacore.com>
3410
3411 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
3412 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
3413 Remove POINTER_TYPE handling, add large unsigned handling and use
3414 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
3415
57f872a2 34162012-10-12 Jakub Jelinek <jakub@redhat.com>
3417
3418 PR c/54381
3419 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
3420 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
3421 locs and array of 3 trees instead of just single loc and single
3422 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
3423 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
3424 For *cmp* builtins that take two sources strings report warnings
3425 about first and second source, not about destination and source.
3426
7354ad2e 34272012-10-12 Marc Glisse <marc.glisse@inria.fr>
3428
3429 PR c++/53055
3430 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
3431
1ac7f120 34322012-10-11 Eric Botcazou <ebotcazou@adacore.com>
3433
3434 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
3435 declaring something coming from another file.
3436
1e0cc9e3 34372012-10-10 Arnaud Charlet <charlet@adacore.com>
3438
1ac7f120 3439 PR ada/54845
1e0cc9e3 3440 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
3441
b0e7825e 34422012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3443
3444 PR c++/54194
3445 * c-common.c (warn_about_parentheses): Add location_t parameter;
3446 use EXPR_LOC_OR_LOC.
3447 * c-common.h: Update declaration.
3448
41ed701a 34492012-10-09 Marc Glisse <marc.glisse@inria.fr>
3450
3451 PR c++/54427
3452 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
3453 more operations. Make error messages optional.
3454 * c-common.h (enum stv_conv): Moved from c-typeck.c.
3455 (scalar_to_vector): Declare.
3456
3740094c 34572012-10-08 Jason Merrill <jason@redhat.com>
3458
3459 * c-common.c (c_common_reswords): Add thread_local.
3460
ffcdbf9c 34612012-10-08 Dodji Seketeli <dodji@redhat.com>
3462
3463 PR c++/53528 C++11 attribute support
3464 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
3465 new functions.
3466 * c-common.c (check_cxx_fundamental_alignment_constraints): New
3467 static function.
3468 (handle_aligned_attribute): In choose strictest alignment
3469 among many. Use new check_cxx_fundamental_alignment_constraints.
3470 (handle_transparent_union_attribute): In c++11 attribute syntax,
3471 don't look through typedefs.
3472
ef34afc1 34732012-10-04 Arnaud Charlet <charlet@adacore.com>
3474
3475 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
3476 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
3477 out of dumpfile.h.
3478
f1ff4562 34792012-09-25 Dehao Chen <dehao@google.com>
3480
3481 PR middle-end/54645
ef34afc1 3482 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
f1ff4562 3483 map when read in the pch.
3484
735538a1 34852012-09-18 Arnaud Charlet <charlet@adacore.com>
3486
3487 * c-ada-spec.c: Style fixes.
3488
9120cdc8 34892012-09-18 Thomas Quinot <quinot@adacore.com>
3490
3491 * c.opt (-fada-spec-parent): Define new command line switch.
3492 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
3493 is specified, generate binding spec as a child of the specified unit.
3494
8eba82c2 34952012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
3496 Manuel López-Ibáñez <manu@gcc.gnu.org>
3497
3498 PR c++/53210
3499 * c.opt ([Winit-self]): Enabled by -Wall in C++.
3500
38682990 35012012-08-23 Arnaud Charlet <charlet@adacore.com>
3502
3503 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
3504 for pointers, and add missing Convention C pragma.
3505 (print_ada_struct_decl): Add missing aliased keyword.
3506 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
3507
f003f5dc 35082012-08-17 Jakub Jelinek <jakub@redhat.com>
3509
3510 * c-common.c (sizeof_pointer_memaccess_warning): New function.
3511 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
3512 * c-opts.c (c_common_handle_option): Enable it for -Wall.
3513 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
3514 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
3515
ec11736b 35162012-08-10 Richard Guenther <rguenther@suse.de>
3517
3518 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
3519
5f7f600e 35202012-08-07 Steven Bosscher <steven@gcc.gnu.org>
3521
3522 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
3523 instead of separate pp_newline and pp_flush.
3524 (print_c_tree): Likewise.
3525
758a38ab 35262012-07-26 Richard Henderson <rth@redhat.com>
3527
3528 * c-common.c (handle_hot_attribute): Allow labels.
3529 (handle_cold_attribute): Likewise.
3530
9ca77b08 35312012-07-20 Jakub Jelinek <jakub@redhat.com>
3532
3533 PR c++/28656
3534 * c-common.c (check_function_nonnull): Handle multiple nonnull
3535 attributes properly.
3536
b9ed1410 35372012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3538
3539 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
3540 * c-ada-spec.c: Likewise.
3541 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
3542
c2a65b90 35432012-07-14 Steven Bosscher <steven@gcc.gnu.org>
3544
3545 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
3546 Remove code conditional on it.
3547
88c5a1d1 35482012-07-11 Steven Bosscher <steven@gcc.gnu.org>
3549
3550 * c-gimplify.c: Do not include basic-block.h.
3551 * c-common.c: Do not include linfuncs.h.
3552
4a020a8c 35532012-07-08 Steven Bosscher <steven@gcc.gnu.org>
3554
3555 * c-common.h: Include tree.h.
3556
c28ddc97 35572012-07-02 Jason Merrill <jason@redhat.com>
3558
3559 PR c++/53524
3560 * c-common.c (get_priority): Call default_conversion.
3561
405ed67f 35622012-07-01 Uros Bizjak <ubizjak@gmail.com>
3563
3564 * c-pch.c (c_common_write_pch): Remove unused variables.
3565
e53d55e7 35662012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3567
3568 * cppspec.c: Moved from gcc/ to here.
3569
3d9c25ec 35702012-06-27 Kai Tietz <ktietz@redhat.com>
3571
3572 PR preprocessor/37215
3573 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
3574
3169c57a 35752012-06-21 Steven Bosscher <steven@gcc.gnu.org>
3576
3577 * c-common.h (c_common_print_pch_checksum): Remove.
3578 * c-pch.c: Do not include output.h.
3579 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
3580 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
3581 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
3582 (struct c_pch_header): Remove.
3583 (get_ident): Update gpch version.
3584 (pch_init): Do not print executable_checksum to asm_out_file.
3585 Do not fail if there is no asm_out_file to read back from. Set
3586 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
3587 (c_common_write_pch): Verify that nothing was written to asm_out_file
3588 since pch_init was called. Do not write a c_pch_header, and do not
3589 copy from asm_out_file to the PCH.
3590 (c_common_read_pch): Do not read a c_pch_header, and do not restore
3591 the content of asm_out_file from the PCH.
3592 (c_common_print_pch_checksum): Remove.
3593 * c-opts.c (c_common_init): Print out executable_checksum directly.
3594
ff6624bc 35952012-06-19 Steven Bosscher <steven@gcc.gnu.org>
3596
3597 * c-target.def (objc_declare_unresolved_class_reference,
3598 objc_declare_class_definition): Add new hooks.
3599
367b1459 36002012-06-19 Steven Bosscher <steven@gcc.gnu.org>
3601
3602 * c-lex.c: Do not include output.h.
3603 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
3604 Remove uses of ASM_OUTPUT_IDENT.
3605
bf0cb017 36062012-06-15 Marc Glisse <marc.glisse@inria.fr>
3607
3608 PR c++/51033
3609 * c-common.h (c_build_vec_perm_expr): Move decl here.
3610 * c-common.c (c_build_vec_perm_expr): Move definition
3611 here.
3612
b37a3600 36132012-06-06 Steven Bosscher <steven@gcc.gnu.org>
3614
3615 * c.opt (fconserve-space): Turn into a no-op.
3616
19931eea 36172012-06-04 Sterling Augustine <saugustine@google.com>
5f9e7dd5 3618
3619 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
3620 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
3621 both the start and end of the function.
3622
dff12c10 36232012-06-04 Steven Bosscher <steven@gcc.gnu.org>
3624
3625 * c-common.c: Do not include output.h.
3626 * c-pragma.c: Likewise.
3627
5f9e7dd5 36282012-06-04 Steven Bosscher <steven@gcc.gnu.org>
3629
3630 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
3631 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
3632 (lang_decl_name): Handle namespace decls.
3633
b5369b7d 36342012-05-31 Steven Bosscher <steven@gcc.gnu.org>
3635
3636 * c-ada-spec.c: Do not include output.h.
3637 * c-semantics.c: Likewise.
3638
8032877c 36392012-05-29 Joseph Myers <joseph@codesourcery.com>
3640
3641 * c-common.c: Fix typo.
3642
7843e4bc 36432012-05-29 Michael Matz <matz@suse.de>
3644
3645 * c-common.h (c_expand_decl): Remove prototype.
3646
8cf857d4 36472012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3648
3649 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
3650 * c-opts.c (c_common_handle_option): Remove code handling
3651 warn_missing_braces.
3652
8b64dc3c 36532012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
3654
3655 PR c++/25137
3656 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
3657 -Wmissing_braces.
3658
43cbde16 36592012-05-22 Dodji Seketeli <dodji@redhat.com>
3660
3661 PR c++/53322
3662 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
3663
db490cb6 36642012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
3665
3666 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
3667 * c-opts.c (c_common_handle_option): Do not handle explicitly
3668 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
3669
a60f3e81 36702012-05-16 Dodji Seketeli <dodji@redhat.com>
3671
3672 PR preprocessor/7263
3673 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
3674 to cpp_classify_number. For diagnostics, use the precise location
3675 instead of the global input_location.
3676
82e6ef7c 36772012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
3678
cd4797ff 3679 PR c++/11856
82e6ef7c 3680 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
3681
258a168d 36822012-05-14 Bernd Schmidt <bernds@codesourcery.com>
3683
82e6ef7c 3684 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
258a168d 3685
d3b7ee7c 36862012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
3687
3688 PR 53063
3689 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
3690 Wreorder): Use LangEnabledBy.
3691 * c-opts.c (c_common_handle_option): Do not enable them
3692 explicitly. Call lang-specific generated functions.
3693 (c_common_post_options): Do not set them here.
3694
70059cea 36952012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
3696
3697 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
3698 Wmissing-field-initializers,Wmissing-parameter-type,
3699 Wold-style-declaration,Woverride-init): Use EnabledBy.
3700 * c-opts.c (c_common_post_options): Do not set here explicitly.
3701
fbb6fbd8 37022012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
3703
3704 PR 53063
3705 * c-opts.c (c_common_handle_option): Use handle_generated_option
3706 to enable sub-options.
3707
61f69bc9 37082012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
3709
3710 PR c++/53158
3711 * c-common.c (warnings_for_convert_and_check): Use warning_at.
3712
5a1fe2db 37132012-05-10 Richard Guenther <rguenther@suse.de>
3714
3715 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
3716 adjust commentary about TYPE_IS_SIZETYPE types.
3717
d42e7c5a 37182012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3719
3720 PR c++/53261
3721 * c-common.c (warn_logical_operator): Check that argument of
3722 integer_zerop is not NULL.
3723
686369e8 37242012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
3725
3726 PR c/43772
3727 * c-common.c (warn_logical_operator): Do not warn if either side
3728 is already true or false.
3729
03fe1dc2 37302012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
3731
3732 PR c/51712
3733 * c-common.c (expr_original_type): New.
3734 (shorten_compare): Do not warn for enumeration types.
3735
bba5a206 37362012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
3737
3738 * c.opt (fpermissive): Add Var(flag_permissive).
3739
7059d45d 37402012-04-30 Marc Glisse <marc.glisse@inria.fr>
3741
3742 PR c++/51033
3743 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
3744 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
3745
7edb1062 37462012-04-30 Dodji Seketeli <dodji@redhat.com>
3747
3748 Add -Wvarargs option
3749 * c.opt (Wvarargs): Define new option.
3750
068bea1e 37512012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
3752
3753 * c-common.c (check_function_arguments): Replace
3754 Wmissing-format-attribute with Wsuggest-attribute=format.
3755
b86527d8 37562012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
3757
3758 * c.opt (Wsuggest-attribute=format): New. Alias of
3759 Wmissing-format-attribute.
3760 * c-format.c (decode_format_type): Replace
3761 Wmissing-format-attribute with Wsuggest-attribute=format.
3762 (check_function_format): Likewise.
3763
19931eea 37642012-04-27 Ollie Wild <aaw@google.com>
76d340ac 3765
3766 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
3767 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
3768 * c.opt: Add Wliteral-suffix.
3769
29438999 37702012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3771
3772 PR c/44774
3773 * c.opt (Wpedantic): New.
3774 (pedantic): Alias Wpedantic.
3775 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
3776 (c_common_post_options): Likewise.
3777 (sanitize_cpp_opts): Likewise.
3778 * c-lex.c (interpret_float): Likewise.
3779 * c-format.c (check_format_types): Likewise.
3780 * c-common.c (pointer_int_sum): Likewise.
3781 (c_sizeof_or_alignof_type): Likewise.
3782 (c_add_case_label): Likewise.
3783 (c_do_switch_warnings): Likewise.
3784 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
3785
4f9d6b8b 37862012-04-15 Jason Merrill <jason@redhat.com>
3787
3788 PR c++/52818
3789 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
3790 (C_STD_NAME): Distinguish between C++98 and C++11.
3791
74bdbe96 37922012-04-11 Eric Botcazou <ebotcazou@adacore.com>
3793
3794 PR target/52624
3795 * c-common.h (uint16_type_node): Rename into...
3796 (c_uint16_type_node): ...this.
3797 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
3798 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
3799
3d177e8c 38002012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
3801
3802 * c-common.c (warn_if_unused_value): Move definition to here.
3803 * c-common.h (warn_if_unused_value): Move declaration to here.
3804
6a9a958f 38052012-03-23 William Bader <williambader@hotmail.com>
3806
3807 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
3808
543efdbe 38092012-03-20 Jason Merrill <jason@redhat.com>
3810
3811 * c-common.h (enum cxx_dialect): Add cxx1y.
3812 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
3813 test.
3814 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3815 * c-opts.c (c_common_post_options): Likewise.
3816 (set_std_cxx1y): New.
3817 (c_common_handle_option): Call it.
3818 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
3819
62206d34 38202012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
3821
3822 PR c++/14710
3823 * c.opt ([Wuseless-cast]): Add.
3824
fadf62f4 38252012-03-16 Richard Guenther <rguenther@suse.de>
3826
3827 * c-pretty-print.c (pp_c_initializer_list): Adjust.
3828
249faa35 38292012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
3830
3831 PR c++/44783
3832 * c.opt (ftemplate-backtrace-limit) Add.
3833
126b6848 38342012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3835
3836 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
3837 handling.
3838 * c-pragma.c (handle_pragma_extern_prefix): Remove.
3839 (init_pragma): Don't register extern_prefix.
3840
a51edb4c 38412012-03-12 Richard Guenther <rguenther@suse.de>
3842
3843 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
3844 (builtin_type_for_size): Likewise.
3845
0f6a7cb7 38462012-02-13 Jakub Jelinek <jakub@redhat.com>
3847
3848 PR c++/52215
3849 * c-common.c (sync_resolve_params): Don't decide whether to convert
3850 or not based on TYPE_SIZE comparison, convert whenever arg_type
3851 is unsigned INTEGER_TYPE.
3852
0779e32c 38532012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
3854
3855 PR c/52118
3856 * c.opt ([Wunused-local-typedefs]): Fix description.
3857
baec58e1 38582012-01-24 Mike Stump <mikestump@comcast.net>
3859
3860 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
3861 exactly.
3862
c779d8cc 38632012-01-18 Richard Guenther <rguenther@suse.de>
3864
3865 * c-opts.c (c_common_post_options): Reset LTO flags if
3866 we are about to generate a PCH.
3867
ee917d24 38682012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3869
3870 PR c++/51777
3871 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
3872 use pp_unsigned_wide_integer.
3873
90e2341f 38742012-01-10 Richard Guenther <rguenther@suse.de>
3875
3876 PR middle-end/51806
3877 * c-opts.c (c_common_handle_option): Move -Werror handling
3878 to language independent code.
3879
9ea022ce 38802012-01-05 Richard Guenther <rguenther@suse.de>
3881
3882 PR middle-end/51764
3883 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
3884 from common.opt.
3885
3df19e1b 38862011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
3887
3888 PR c++/51316
3889 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
3890 of array types with an unknown bound.
3891
32074525 38922011-12-20 Joseph Myers <joseph@codesourcery.com>
3893
3894 * c-common.c (flag_isoc99): Update comment to refer to C11.
3895 (flag_isoc1x): Change to flag_isoc11.
3896 * c-common.h (flag_isoc99): Update comment to refer to C11.
3897 (flag_isoc1x): Change to flag_isoc11.
3898 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
3899 C11.
3900 * c-opts.c (set_std_c1x): Change to set_std_c11.
3901 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
3902 Call set_std_c11.
3903 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
3904 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
3905 * c.opt (std=c1x): Change to std=c11. Document as non-draft
3906 standard.
3907 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
3908 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
3909 (std=gnu1x): Make alias of std=gnu11.
3910
fca86134 39112011-12-19 Jason Merrill <jason@redhat.com>
3912
3913 PR c++/51228
3914 * c-common.c (handle_transparent_union_attribute): Check the first
3915 field if the type is complete.
3916
aa4313eb 39172011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
3918
3919 PR libstdc++/51365
3920 * c-common.c (RID_IS_FINAL): Add.
3921 * c-common.h (RID_IS_FINAL): Add.
3922
3f3d5ad4 39232011-11-30 Iain Sandoe <iains@gcc.gnu.org>
3924
3925 * c.opt (fgnu-runtime): Provide full description.
3926 (fnext-runtime): Likewise.
3927 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
3928
c4606d19 39292011-11-28 Andrew MacLeod <amacleod@redhat.com>
3930
3931 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
3932 predefines in one place. Add LOCK_FREE predefines.
3933 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
3934 new func.
3935
1d581089 39362011-11-24 Andrew MacLeod <amacleod@redhat.com>
3937
3938 PR c/51256
19931eea 3939 * c-common.c (get_atomic_generic_size): Check for various error
1d581089 3940 conditions
19931eea 3941 (resolve_overloaded_atomic_exchange,
3942 resolve_overloaded_atomic_compare_exchange,
1d581089 3943 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
3944 error_mark_node for error conditions.
19931eea 3945
6aa221fa 39462011-11-08 Richard Guenther <rguenther@suse.de>
3947
3948 PR middle-end/51010
3949 c-family/
3950
4c0315d0 39512011-11-07 Richard Henderson <rth@redhat.com>
3952 Aldy Hernandez <aldyh@redhat.com>
3953 Torvald Riegel <triegel@redhat.com>
3954
3955 Merged from transactional-memory.
3956
3957 * c-common.c (handle_tm_wrap_attribute,
3958 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
3959 (struct c_common_reswords): Added __transaction* keywords.
3960 (struct c_common_attribute_table): Added transaction* and tm_regparm
3961 attributes.
3962 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
3963 masks.
3964 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
3965 find_tm_attribute): Declare.
3966
920f5a70 39672011-11-07 Jason Merrill <jason@redhat.com>
3968
3969 PR c++/35688
3970 * c-common.c, c-common.h: Revert yesterday's changes.
3971
b4f861b4 39722011-11-06 Jason Merrill <jason@redhat.com>
3973
3974 PR c++/35688
3975 * c-common.c (decl_has_visibility_attr): Split out from...
3976 (c_determine_visibility): ...here.
3977 * c-common.h: Declare it.
3978
83e25171 39792011-11-06 Joseph Myers <joseph@codesourcery.com>
3980
3981 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
3982 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
3983 type.
3984 (check_user_alignment): New. Split out of
3985 handle_aligned_attribute. Disallow integer constants with
3986 noninteger types. Conditionally allow zero.
3987 (handle_aligned_attribute): Use check_user_alignment.
3988 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
3989
1cd6e20d 39902011-11-06 Andrew MacLeod <amacleod@redhat.com>
3991 Richard Henderson <rth@redhat.com>
3992
3993 Merged from cxx-mem-model.
3994
3995 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
19931eea 3996 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
1cd6e20d 3997 parameters that are the same type size.
3998 (get_atomic_generic_size): New. Find size of generic
3999 atomic function parameters and do typechecking.
4000 (add_atomic_size_parameter): New. Insert size into parameter list.
4001 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
4002 either __atomic_exchange_n or external library call.
19931eea 4003 (resolve_overloaded_atomic_compare_exchange): Restructure
1cd6e20d 4004 __atomic_compare_exchange to either _n variant or external library call.
19931eea 4005 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
1cd6e20d 4006 __atomic_load_n or an external library call.
4007 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
4008 __atomic_store_n or an external library call.
4009 (resolve_overloaded_builtin): Handle new __atomic builtins.
4010
7549df0d 40112011-11-04 Eric Botcazou <ebotcazou@adacore.com>
4012
4013 PR c++/50608
4014 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
4015 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
4016 <INDIRECT_REF>: Return the argument.
4017 <ARRAY_REF>: Remove special code for negative offset.
4018 Call fold_build_pointer_plus instead of size_binop.
4019 (fold_offsetof): Remove STOP_REF argument and adjust.
4020 * c-common.h (fold_offsetof_1): Declare.
4021 (fold_offsetof): Remove STOP_REF argument.
4022
7e783eb3 40232011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
4024
4025 PR c++/50810
4026 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
4027 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
4028 Wnarrowing for C++0x and C++98.
4029 * c.opt ([Wnarrowing]): Update.
4030
8fe701f5 40312011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
4032
4033 PR c++/44277
4034 * c.opt: Add Wzero-as-null-pointer-constant.
4035
0d84dc2d 40362011-10-31 Jason Merrill <jason@redhat.com>
4037
67031f52 4038 * c.opt (-fdeduce-init-list): Off by default.
4039
0d84dc2d 4040 PR c++/50920
4041 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
4042 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
4043 and -Wc++11-compat.
4044 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
4045
66f24c41 40462011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
4047
4048 PR c++/30066
4049 * c.opt (fvisibility-inlines-hidden): Description change.
4050
244db24d 40512011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
4052
4053 Implement C++11 user-defined literals.
4054 * c-common.c (build_userdef_literal): New.
4055 * c-common.def: New tree code.
4056 * c-common.h (tree_userdef_literal): New tree struct and accessors.
4057 * c-lex.c (interpret_float): Add suffix parm.
4058 (c_lex_with_flags): Build literal tokens.
4059
235be70f 40602011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
4061
4062 PR c++/50841
4063 Revert:
4064 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
4065
4066 PR c++/50810
4067 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
4068 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
4069 Wnarrowing for C++0x and C++98.
4070 * c.opt ([Wnarrowing]): Update.
4071
4fe0fb1c 40722011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
4073
4074 PR c++/50810
4075 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
4076 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
4077 Wnarrowing for C++0x and C++98.
4078 * c.opt ([Wnarrowing]): Update.
4079
5f7504f9 40802011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
4081
4082 PR c++/45385
4083 * c-common.c (conversion_warning): Remove code looking for
4084 artificial operands.
4085
2a688977 40862011-10-18 Dodji Seketeli <dodji@redhat.com>
4087
4088 PR bootstrap/50760
4089 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
19931eea 4090 !NO_IMPLICIT_EXTERN_C.
2a688977 4091
326e3391 40922011-10-17 Michael Spertus <mike_spertus@symantec.com>
4093
4094 * c-common.c (c_common_reswords): Add __bases,
4095 __direct_bases.
4096 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
4097
40982011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
4099
4100 PR c++/50757
4101 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
4102
62db153a 41032011-10-15 Tom Tromey <tromey@redhat.com>
4104 Dodji Seketeli <dodji@redhat.com>
4105
4106 * c.opt (fdebug-cpp): New option.
4107 * c-opts.c (c_common_handle_option): Handle the option.
4108 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
4109 output stream in parameter. Factorized from ...
4110 (maybe_print_line): ... this. Dump location debug information when
4111 -fdebug-cpp is in effect.
4112 (print_line_1): New static function. Takes an output stream in
4113 parameter. Factorized from ...
4114 (print_line): ... here. Dump location information when -fdebug-cpp
4115 is in effect.
4116 (scan_translation_unit): Dump location information when
4117 -fdebug-cpp is in effect.
4118
ce70f433 41192011-10-15 Tom Tromey <tromey@redhat.com>
4120 Dodji Seketeli <dodji@redhat.com>
4121
4122 * c.opt (ftrack-macro-expansion): New option. Handle it with and
4123 without argument.
4124 * c-opts.c (c_common_handle_option)<case
4125 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
4126 cases. Handle -ftrack-macro-expansion with and without argument.
4127
97bfb9ef 41282011-10-15 Tom Tromey <tromey@redhat.com>
4129 Dodji Seketeli <dodji@redhat.com>
4130
4131 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
4132 (print_line, cb_define, do_line_change): Adjust to avoid touching
4133 the internals of struct line_map. Use the public API instead.
4134 * c-pch.c (c_common_read_pch): Likewise.
4135 * c-lex.c (fe_file_change): Likewise.
4136
326e3391 41372011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
4138
4139 PR c++/17212
4140 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
4141
41422011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
4143
4144 PR c++/33067
4145 * c-pretty-print.c (pp_c_floating_constant): Output
4146 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
4147
b9a16870 41482011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
4149
4150 * c-common.c (def_builtin_1): Delete old interface with two
4151 parallel arrays to hold standard builtin declarations, and replace
4152 it with a function based interface that can support creating
4153 builtins on the fly in the future. Change all uses, and poison
4154 the old names. Make sure 0 is not a legitimate builtin index.
4155 * c-omp.c (c_finish_omp_barrier): Ditto.
4156 (c_finish_omp_taskwait): Ditto.
4157 (c_finish_omp_flush): Ditto.
4158
c7964868 41592011-10-11 Tristan Gingold <gingold@adacore.com>
4160
4161 * c.opt: (fallow-parameterless-variadic-functions): New.
4162
a4e3ffad 41632011-09-08 Dodji Seketeli <dodji@redhat.com>
4164
4165 PR c++/33255 - Support -Wunused-local-typedefs warning
4166 * c-common.h (struct c_language_function::local_typedefs): New
4167 field.
19931eea 4168 (record_locally_defined_typedef, maybe_record_typedef_use)
4169 (maybe_warn_unused_local_typedefs): Declare new functions.
a4e3ffad 4170 * c-common.c (record_locally_defined_typedef)
19931eea 4171 (maybe_record_typedef_use)
4172 (maybe_warn_unused_local_typedefs): Define new functions.
a4e3ffad 4173 * c.opt: Declare new -Wunused-local-typedefs flag.
4174
737a23cc 41752011-09-06 Eric Botcazou <ebotcazou@adacore.com>
4176
4177 PR middle-end/50266
4178 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
4179 computations.
4180
7542c3b4 41812011-09-05 Richard Guenther <rguenther@suse.de>
4182
4183 * c-common.c (complete_array_type): Use ssize_int (-1) instead
4184 of integer_minus_one_node for empty array upper bounds.
4185
1dc92c59 41862011-08-28 Dodji Seketeli <dodji@redhat.com>
4187
4188 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
4189 it's the first time it's being called on this main TU.
4190
2bdf2b6e 41912011-08-24 Richard Guenther <rguenther@suse.de>
4192
4193 PR c/49396
4194 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
4195
41962011-08-22 Gabriel Charette <gchare@google.com>
6ea2c7a3 4197
4198 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
4199 defined in cpp_init_builtins and c_cpp_builtins.
4200
bff4ad11 42012011-08-19 Joseph Myers <joseph@codesourcery.com>
4202
4203 * c-common.c (c_common_reswords): Add __builtin_complex.
4204 * c-common.h (RID_BUILTIN_COMPLEX): New.
4205
985c6e3a 42062011-08-18 Joseph Myers <joseph@codesourcery.com>
4207
4208 * c-common.c (c_common_reswords): Add _Noreturn.
4209 (keyword_is_function_specifier): Handle RID_NORETURN.
4210 * c-common.h (RID_NORETURN): New.
4211
7dfa155b 42122011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
4213
4214 * c-common.c (unsafe_conversion_p): New function. Check if it is
4215 unsafe to convert an expression to the type.
4216 (conversion_warning): Adjust, use unsafe_conversion_p.
4217 * c-common.h (unsafe_conversion_p): New function declaration.
4218
2169f33b 42192011-08-02 Jakub Jelinek <jakub@redhat.com>
4220
4221 * c-common.h (c_finish_omp_atomic): Adjust prototype.
4222 (c_finish_omp_taskyield): New prototype.
4223 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
4224 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
4225 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
4226 or RHS1 have side-effects, evaluate those too in the right spot,
4227 if it is a decl and LHS is also a decl, error out if they
4228 aren't the same.
4229 (c_finish_omp_taskyield): New function.
4230 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
4231 * c-pragma.c (omp_pragmas): Add taskyield.
4232 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
4233 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
4234 PRAGMA_OMP_CLAUSE_MERGEABLE.
4235
ab77850e 42362011-07-25 Dodji Seketeli <dodji@redhat.com>
4237
4238 * c-common.h (set_underlying_type): Remove parm name from
4239 declaration.
4240
6ee97920 42412011-07-25 Romain Geissler <romain.geissler@gmail.com>
4242
4243 * c-pretty-print.h: Search c-common.h in c-family.
19931eea 4244
dc251364 42452011-07-22 Jason Merrill <jason@redhat.com>
4246
1a2a35f0 4247 PR c++/49793
4248 * c.opt (Wnarrowing): New.
4249
27282252 4250 PR c++/30112
4251 * c-common.h: Declare c_linkage_bindings.
4252 * c-pragma.c (handle_pragma_redefine_extname): Use it.
4253
dc251364 4254 PR c++/49813
4255 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
4256 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
4257 as flag_isoc99 for 'restrict'.
4258 (pp_c_specifier_qualifier_list): Likewise for _Complex.
4259
fc501191 42602011-07-21 Ian Lance Taylor <iant@google.com>
4261
4262 PR middle-end/49705
4263 * c-common.c (c_disable_warnings): New static function.
4264 (c_enable_warnings): New static function.
4265 (c_fully_fold_internal): Change local unused_p to bool. Call
4266 c_disable_warnings and c_enable_warnings rather than change
4267 c_inhibit_evaluation_warnings.
4268
07b8f133 42692011-07-20 Jason Merrill <jason@redhat.com>
4270
4271 PR c++/6709 (DR 743)
4272 PR c++/42603 (DR 950)
4273 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
4274 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
4275 (CPP_DECLTYPE): New.
4276 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
4277
2cc66f2a 42782011-07-19 Richard Guenther <rguenther@suse.de>
4279
4280 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
4281 * c-omp.c (c_finish_omp_for): Likewise.
4282
3c802a1e 42832011-07-12 Eric Botcazou <ebotcazou@adacore.com>
4284
4285 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
4286 body on the next line.
4287
98a33d9f 42882011-07-08 Jason Merrill <jason@redhat.com>
4289
3115bda0 4290 PR c++/45437
4291 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
4292
98a33d9f 4293 PR c++/49673
4294 * c-common.c (c_apply_type_quals_to_decl): Don't check
4295 TYPE_NEEDS_CONSTRUCTING.
4296
c38a75b7 42972011-07-06 Richard Guenther <rguenther@suse.de>
4298
4299 * c-common.c (c_common_nodes_and_builtins):
4300 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
4301
e593356b 43022011-07-05 Richard Guenther <rguenther@suse.de>
4303
4304 * c-common.c (c_common_nodes_and_builtins): Build all common
4305 tree nodes first.
4306
fca0886c 43072011-06-27 Jakub Jelinek <jakub@redhat.com>
4308
a68f7a8d 4309 * c-common.h (c_tree_chain_next): New static inline function.
4310
fca0886c 4311 * c-common.c (check_builtin_function_arguments): Handle
4312 BUILT_IN_ASSUME_ALIGNED.
4313
2797f13a 43142011-06-21 Andrew MacLeod <amacleod@redhat.com>
4315
4316 * c-common.c: Add sync_ or SYNC__ to builtin names.
4317 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9cad95b7 4318
43192011-06-20 Pierre Vittet <piervit@pvittet.com>
4320
4321 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
4322 handler.
4323 (gen_pragma_handler): New union.
4324 (internal_pragma_handler): New type.
4325 (c_register_pragma_with_data)
4326 (c_register_pragma_with_expansion_and_data): New functions.
4327
4328 * c-pragma.c (registered_pragmas, c_register_pragma_1)
4329 (c_register_pragma, c_register_pragma_with_expansion)
4330 (c_invoke_pragma_handler): Changed to work with
4331 internal_pragma_handler.
4332 (c_register_pragma_with_data)
4333 (c_register_pragma_with_expansion_and_data): New functions.
4334
218e3e4e 43352011-06-14 Joseph Myers <joseph@codesourcery.com>
4336
4337 * c-common.c: Include common/common-target.h.
4338 (handle_section_attribute): Use
4339 targetm_common.have_named_sections.
4340 * c-cppbuiltin.c: Include common/common-target.h.
4341 (c_cpp_builtins): Use targetm_common.except_unwind_info.
4342
41e53ed2 43432011-06-10 Richard Guenther <rguenther@suse.de>
4344
4345 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
4346 to print a IDENTIFIER_NODE.
4347
a6f06169 43482011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4349 Joseph Myers <joseph@codesourcery.com>
4350
4351 * c.opt (fbuilding-libgcc): New option.
4352 * c-cppbuiltin.c (c_cpp_builtins): Define
4353 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
4354
1ea9269b 43552011-06-07 Jason Merrill <jason@redhat.com>
4356
8ce59854 4357 * c-common.c (max_tinst_depth): Lower default to 900.
4358
1ea9269b 4359 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
4360
1af0124d 43612011-06-07 Richard Guenther <rguenther@suse.de>
4362
4363 * c-common.c (c_common_nodes_and_builtins): Do not set
4364 size_type_node or call set_sizetype.
4365
0e9a4c01 43662011-06-07 Dodji Seketeli <dodji@redhat.com>
4367
4368 PR debug/49130
4369 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
19931eea 4370 type when using pointer comparison to compare types.
0e9a4c01 4371
90b40725 43722011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
4373
4374 * c.opt: Add -Wdelete-non-virtual-dtor.
4375 * c-opts.c (c_common_handle_option): Include it in -Wall.
4376
fc9c9e87 43772011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
4378
4379 PR bootstrap/49190
4380
4381 Revert:
4382 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
4383
4384 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
4385 not tree_common.
4386
d0389adc 43872011-05-27 Jakub Jelinek <jakub@redhat.com>
4388
4389 PR c++/49165
4390 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
4391 C++ don't call c_common_truthvalue_conversion on void type arms.
4392
cacfdc02 43932011-05-27 Nathan Froyd <froydnj@codesourcery.com>
4394
4395 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
4396 (stmt_list_stack): Define.
4397 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
4398 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
4399
027fc6ef 44002011-05-26 Nathan Froyd <froydnj@codesourcery.com>
4401
4402 * c-common.c (warning_candidate_p): Check for BLOCKs.
4403
f21317a1 44042011-05-26 Nathan Froyd <froydnj@codesourcery.com>
4405
4406 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
4407 not tree_common.
4408
789e953d 44092011-05-25 Jakub Jelinek <jakub@redhat.com>
4410
4411 * c-common.c (def_fn_type): Remove extra va_end.
4412
7f506bca 44132011-05-23 Jason Merrill <jason@redhat.com>
4414
4415 PR c++/48106
4416 * c-common.c (c_common_get_narrower): New.
4417 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
4418
774e9d58 44192011-05-23 Nathan Froyd <froydnj@codesourcery.com>
4420
4421 * c-common.h (check_function_arguments): Tweak prototype of
4422 check_function_arguments.
4423 * c-common.c (check_function_arguments): Likewise. Adjust
4424 calls to check_function_nonnull, check_function_format, and
4425 check_function_sentinel.
4426 (check_function_sentinel): Take a FUNCTION_TYPE rather than
4427 separate attributes and typelist arguments. Use
4428 FOREACH_FUNCTION_ARGS to iterate over argument types.
4429
23407dc9 44302011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
4431
4432 * c-common.c (c_common_reswords): Reorder.
4433 * c-common.h (rid): Likewise.
4434
3a939d12 44352011-05-10 Nathan Froyd <froydnj@codesourcery.com>
4436
4437 * c-common.c (def_fn_type): Don't call build_function_type, call
4438 build_function_type_array or build_varargs_function_type_array
4439 instead.
4440 (c_common_nodes_and_builtins): Likewise.
4441
b6e3dd65 44422011-05-05 Nathan Froyd <froydnj@codesourcery.com>
4443
4444 * c-common.c (c_add_case_label): Omit the loc argument to
4445 build_case_label.
4446 * c-common.h (build_case_label): Remove.
4447 * c-semantics.c (build_case_label): Remove.
4448
4232a958 44492011-05-05 Joseph Myers <joseph@codesourcery.com>
4450
4451 * c-objc.h (objc_start_method_definition): Update prototype.
4452 * stub-objc.c (objc_start_method_definition): Add extra parameter.
4453
d0af78c5 44542011-05-04 Nathan Froyd <froydnj@codesourcery.com>
4455
4456 * c-common.c (check_main_parameter_types): Reindent. Don't use
4457 TYPE_ARG_TYPES directly.
4458 (handle_nonnull_attribute): Likewise.
4459 (sync_resolve_params): Likewise.
4460 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
4461 to check_format_string.
4462 (handle_format_attribute): Likewise.
4463 (check_format_string): Take a function type to examine instead of
4464 a type list. Use a function_arg_iterator to step through argument
4465 types.
4466
ceb7b692 44672011-05-04 Richard Guenther <rguenther@suse.de>
4468
4469 * c-common.c (fix_string_type): Use size_int for index type bounds.
4470 (start_fname_decls): Do not pass NULL to build_int_cst.
4471 (c_init_attributes): Likewise.
4472 * c-lex.c (c_lex_with_flags): Likewise.
4473
c66c81be 44742011-04-27 Jason Merrill <jason@redhat.com>
4475
4476 * c-common.c (make_tree_vector_from_list): New.
4477 * c-common.h: Declare it.
4478
16930c72 44792011-04-26 Richard Guenther <rguenther@suse.de>
4480
4481 PR preprocessor/48248
4482 * c-ppoutput.c (maybe_print_line): Always optimize newlines
4483 for output size with -P.
4484
23407dc9 44852011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
4486
4487 * c-common.c (struct c_common_resword): Add __underlying_type.
4488 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
4489
dd045aee 44902011-04-20 Jim Meyering <meyering@redhat.com>
4491
4492 * c-format.c (init_dollar_format_checking): Remove useless
4493 if-before-free.
4494
394dd737 44952011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
4496
4497 * c-objc.h (objc_get_interface_ivars): Removed.
23407dc9 4498 (objc_detect_field_duplicates): New.
394dd737 4499 * stub-objc.c: Likewise.
23407dc9 4500
a758bf7d 45012011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
4502
4503 * stub-objc.c (objc_declare_protocols): Renamed to
4504 objc_declare_protocol.
4505 * c-objc.h: Likewise.
23407dc9 4506
29d7200d 45072011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
4508
4509 * stub-objc.c (objc_declare_class): Updated argument name.
4510
9b88d08d 45112011-04-12 Nathan Froyd <froydnj@codesourcery.com>
4512
4513 * c-common.h (c_common_init_ts): Declare.
4514 * c-common.c (c_common_init_ts): Define.
4515
4185cf58 45162011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
4517
4518 * c-objc.h (objc_build_message_expr): Updated prototype.
4519 * stub-objc.c (objc_build_message_expr): Likewise.
19931eea 4520
5a90471f 45212011-04-12 Martin Jambor <mjambor@suse.cz>
4522
4523 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
4524 of cgraph_node.
4525
783bb57e 45262011-04-11 Richard Guenther <rguenther@suse.de>
4527
4528 * c-common.c (complete_array_type): Build a range type of
4529 proper type.
4530
c33080b9 45312011-04-08 Nathan Froyd <froydnj@codesourcery.com>
4532
4533 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
4534 (handle_type_generic_attribute): Likewise.
4535
f8913d47 45362011-04-07 Jason Merrill <jason@redhat.com>
4537
4538 PR c++/48450
4539 * c-common.c (c_common_truthvalue_conversion): Don't ignore
4540 conversion from C++0x scoped enum.
4541
c94b1d0e 45422011-04-06 Joseph Myers <joseph@codesourcery.com>
4543
4544 * c-target-def.h: New file.
4545 * c-target.def: New file.
4546 * c-target.h: New file.
4547 * c-common.c (targetcm): Don't define here.
4548 * c-common.h (default_handle_c_option): Declare.
4549 * c-format.c: Include c-target.h instead of target.h.
4550 * c-opts.c: Include c-target.h instead of target.h. Explicitly
4551 include tm.h.
4552 (default_handle_c_option): Move from targhooks.c.
4553
acb10f41 45542011-03-29 Jakub Jelinek <jakub@redhat.com>
4555
4556 PR preprocessor/48248
4557 * c-ppoutput.c (print): Add src_file field.
4558 (init_pp_output): Initialize it.
4559 (maybe_print_line): Don't optimize by adding up to 8 newlines
4560 if map->to_file and print.src_file are different file.
4561 (print_line): Update print.src_file.
4562
82715bcd 45632011-03-25 Kai Tietz <ktietz@redhat.com>
4564
4565 * c-ada-spec.c (compare_comment): Use filename_cmp
4566 instead of strcmp for filename.
4567
451c8e2f 45682011-03-25 Jeff Law <law@redhat.com>
4569
1f78217c 4570 * c-common.c (def_fn_type): Add missing va_end.
451c8e2f 4571
3c47771c 45722011-03-25 Jason Merrill <jason@redhat.com>
4573
4574 * c.opt: Add -std=c++03.
4575
97e6200f 45762011-03-22 Eric Botcazou <ebotcazou@adacore.com>
4577
4578 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
4579
ac86af5d 45802011-03-17 Kai Tietz
4581
4582 PR target/12171
ee212425 4583 * c-pretty-print.c (pp_c_specifier_qualifier_list):
4584 Display allowed attributes for function pointer types.
4585 (pp_c_attributes_display): New function to display
4586 attributes having affects_type_identity flag set to true.
4587 * c-pretty-print.h (pp_c_attributes_display): New prototype.
4588
ac86af5d 4589 * c-common.c (c_common_attribute_table):
4590 Add new element.
4591 (c_common_format_attribute_table): Likewise.
4592
914d1151 45932011-03-18 Jason Merrill <jason@redhat.com>
4594
69788bdf 4595 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
4596 * c-common.h: Don't declare it here.
4597 * c-common.c: Or define it here.
4598 * c-opts.c (c_common_handle_option): Or set it here.
4599
914d1151 4600 PR c++/35315
4601 * c-common.c (handle_transparent_union_attribute): Don't
4602 make a duplicate type in C++.
4603
54cf6eed 46042011-03-15 Jason Merrill <jason@redhat.com>
4605
4606 * c-common.c (max_constexpr_depth): New.
4607 * c-common.h: Declare it.
4608 * c-opts.c (c_common_handle_option): Set it.
4609 * c.opt (fconstexpr-depth): New option.
4610
02cb1060 46112011-03-11 Jason Merrill <jason@redhat.com>
4612
9bf1c74e 4613 * c-common.c (attribute_takes_identifier_p): Add missing const.
4614
02cb1060 4615 PR c++/46803
4616 * c-common.c (attribute_takes_identifier_p): Assume that an
4617 unknown attribute takes an identifier.
4618
ecf2703d 46192011-03-07 Nathan Froyd <froydnj@codesourcery.com>
4620
4621 PR c/47786
4622 * c-common.c (c_type_hash): Call list_length instead of iterating
4623 through DECL_CHAIN. Rename 'i' to 'n_elements'.
4624
2b19dfe4 46252011-02-19 Jakub Jelinek <jakub@redhat.com>
4626
4627 PR c/47809
4628 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
4629
29cf2335 46302011-02-17 Iain Sandoe <iains@gcc.gnu.org>
4631
4632 * c.opt (fobjc-abi-version=) New.
4633 (fobjc-nilcheck): New.
4634
fad3f658 46352011-02-03 Nathan Froyd <froydnj@codesourcery.com>
4636
4637 PR c++/46890
4638 * c-common.h (keyword_is_decl_specifier): Declare.
4639 * c-common.c (keyword_is_decl_specifier): Define.
4640 (keyword_is_function_specifier): New function.
4641
a12319b3 46422011-01-26 Jakub Jelinek <jakub@redhat.com>
4643
4644 PR c/47473
4645 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
4646 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
4647 REAL_TYPE.
4648
5c128dc8 46492011-01-26 Arnaud Charlet <charlet@adacore.com>
4650
4651 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
4652
8d67b0c7 46532011-01-26 Jakub Jelinek <jakub@redhat.com>
4654
4655 PR pch/47430
4656 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
4657 after init_c_lex if pch_file is set.
4658
0675168d 46592011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
4660
e8911163 4661 PR c++/43601
0675168d 4662 * c.opt (-fkeep-inline-dllexport): New switch.
4663
0725e25c 46642011-01-12 Richard Guenther <rguenther@suse.de>
4665
4666 PR middle-end/32511
4667 * c-common.c (handle_weak_attribute): Warn instead of error
4668 on declaring an inline function weak.
4669
fdd84b77 46702011-01-05 Tom Tromey <tromey@redhat.com>
4671
4672 * c-common.h (lvalue_error): Update.
4673 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
4674 not error.
4675
e6e73d14 46762010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
19931eea 4677
d67e8485 4678 PR objc/47075
4679 * c-objc.h (objc_finish_message_expr): Added argument to
4680 prototype.
4681
a36cf284 46822010-12-22 Nathan Froyd <froydnj@codesourcery.com>
4683
4684 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
4685 Use prototype_p.
4686
33b3681f 46872010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
4688
4689 * c-objc.h (objc_maybe_warn_exceptions): New.
19931eea 4690 * stub-objc.c (objc_maybe_warn_exceptions): New.
33b3681f 4691
a1f90215 46922010-12-10 Nathan Froyd <froydnj@codesourcery.com>
4693
4694 * c-common.h (readonly_error): Declare.
4695 * c-common.c (readonly_error): Define.
4696
b1bbc8e5 46972010-12-09 Nathan Froyd <froydnj@codesourcery.com>
4698
4699 * c-common.h (invalid_indirection_error): Declare.
4700 * c-common.c (invalid_indirection_error): Define.
4701
b0d55af9 47022010-12-03 Richard Guenther <rguenther@suse.de>
4703
4704 PR c/46745
4705 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
4706 (pp_c_unary_expression): Likewise.
4707 (pp_c_expression): Likewise.
4708
d7489d8d 47092010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
4710
4711 * c-common.h (objc_finish_function): New.
4712 (objc_non_volatilized_type): Removed.
4713 (objc_type_quals_match): Removed.
4714 * stub-objc.c (objc_finish_function): New.
4715 (objc_non_volatilized_type): Removed.
4716 (objc_type_quals_match): Removed.
19931eea 4717
92468061 47182010-11-30 Joseph Myers <joseph@codesourcery.com>
4719
4720 * c-common.h (parse_optimize_options): Declare.
4721 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
4722 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
4723
967958e4 47242010-11-29 Joseph Myers <joseph@codesourcery.com>
4725
4726 * c-opts.c (check_deps_environment_vars): Use getenv instead of
4727 GET_ENVIRONMENT.
4728 * c-pch.c (O_BINARY): Don't define here.
4729 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
4730
b213bf24 47312010-11-25 Joseph Myers <joseph@codesourcery.com>
4732
4733 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
4734 targetm.except_unwind_info.
4735
9faf44d6 47362010-11-23 Joseph Myers <joseph@codesourcery.com>
4737
4738 * c-opts.c (c_common_handle_option): Pass location to
4739 set_struct_debug_option.
4740
79396169 47412010-11-23 Joseph Myers <joseph@codesourcery.com>
4742
4743 * c-common.c (visibility_options): Move from ../opts.c.
4744 * c-common.h (struct visibility_flags, visibility_options):
4745 Declare here.
4746 * c-opts.c (finish_options): Rename to c_finish_options.
4747 (c_common_init): Update call to finish_options.
4748
b4aa4123 47492010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
4750
4751 PR objc/34033
4752 * c-lex.c (lex_string): Check that each string in an Objective-C
4753 string concat sequence starts with either one or zero '@', and
4754 that there are no spurious '@' signs at the end.
4755
3e0e49f2 47562010-11-20 Joseph Myers <joseph@codesourcery.com>
4757
4758 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
4759 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
4760 HANDLE_PRAGMA_VISIBILITY.
4761 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
4762 HANDLE_PRAGMA_VISIBILITY): Don't define.
4763 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
4764
a9ffdd35 47652010-11-20 Nathan Froyd <froydnj@codesourcery.com>
4766
4767 PR c++/16189
4768 PR c++/36888
4769 PR c++/45331
4770 * c-common.h (keyword_begins_type_specifier): Declare.
4771 (keyword_is_storage_class_specifier): Declare.
4772 (keyword_is_type_qualifier): Declare.
4773 * c-common.c (keyword_begins_type_specifier): New function.
4774 (keyword_is_storage_class_specifier): New function.
4775 (keyword_is_type_qualifier): Declare.
4776
93be21c0 47772010-11-19 Joseph Myers <joseph@codesourcery.com>
4778
4779 PR c/46547
4780 * c-common.c (in_late_binary_op): Define.
4781 (c_common_truthvalue_conversion): Check in_late_binary_op before
4782 calling c_save_expr.
4783 * c-common.h (in_late_binary_op): Declare.
4784
d7175aef 47852010-11-19 Joseph Myers <joseph@codesourcery.com>
4786
4787 * c-opts.c (c_common_handle_option): Update calls to
4788 set_struct_debug_option.
4789
c213e196 47902010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
4791
4792 * c-common.h (objc_declare_protocols): Added additional argument.
4793 * stub-objc.c (objc_declare_protocol): Same change.
19931eea 4794
0b5fc5d6 47952010-11-18 Nathan Froyd <froydnj@codesourcery.com>
4796
4797 PR c/33193
4798 * c-common.h (build_real_imag_expr): Declare.
4799 * c-semantics.c (build_real_imag_expr): Define.
4800
b8ba44e7 48012010-11-17 Joseph Myers <joseph@codesourcery.com>
4802
4803 * c-opts.c (c_common_parse_file): Take no arguments.
4804 * c-common.h (c_common_parse_file): Update prototype.
4805
6ef8d12f 48062010-11-16 Jakub Jelinek <jakub@redhat.com>
4807
4808 PR c++/46401
4809 * c-common.c (warning_candidate_p): Don't track non-const calls
4810 or STRING_CSTs.
4811
929d2a90 48122010-11-15 Ian Lance Taylor <iant@google.com>
4813
4814 * c-lex.c (init_c_lex): Set macro debug callbacks if
4815 flag_dump_go_spec is set.
4816
e4a7640a 48172010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
4818
4819 * c-common.h (objc_build_incr_expr_for_property_ref): New.
4820 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
4821
597d2d81 48222010-11-15 Nathan Froyd <froydnj@codesourcery.com>
4823
4824 PR preprocessor/45038
4825 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
4826 dialects.
4827
c123f04d 48282010-11-12 Joseph Myers <joseph@codesourcery.com>
4829
4830 * c-common.h (c_family_lang_mask): Declare.
4831 * c-opts.c (c_family_lang_mask): Make extern.
4832 * c-pragma.c (handle_pragma_diagnostic): Use
4833 control_warning_option.
4834
3c6c0e40 48352010-11-12 Joseph Myers <joseph@codesourcery.com>
4836
4837 * c-common.c (parse_optimize_options): Update call to
4838 decode_options.
4839 * c-common.h (c_common_handle_option): Update prototype.
4840 * c-opts.c (c_common_handle_option): Take location_t parameter and
4841 pass it to other functions.
4842
19ec5c9e 48432010-11-11 Joseph Myers <joseph@codesourcery.com>
4844
4845 * c-opts.c (warning_as_error_callback): Remove.
4846 (c_common_initialize_diagnostics): Don't call
4847 register_warning_as_error_callback.
4848 (c_common_handle_option): Handle -Werror=normalized= here.
4849
bf776685 48502010-11-10 Joseph Myers <joseph@codesourcery.com>
4851
4852 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
4853 in diagnostic.
4854 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
4855 letter.
4856 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
4857 Remove trailing '.' from diagnostics.
4858 * c.opt (Wwrite-strings_: Avoid '`' in help text.
4859
6bd9d862 48602010-11-10 Joseph Myers <joseph@codesourcery.com>
4861
4862 * c-common.c (parse_optimize_options): Pass global_dc to
4863 decode_options.
4864 * c-opts.c (c_common_handle_option): Pass &global_options to
4865 set_Wstrict_aliasing.
4866 * c.opt (v): Don't mark Common or document here.
4867
1f6616ee 48682010-11-06 Iain Sandoe <iains@gcc.gnu.org>
4869
4870 PR target/44981
4871 * c-format.c (format_type): New type gcc_objc_string_format_type.
4872 (valid_stringptr_type_p): New.
4873 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
19931eea 4874 (check_format_string): Pass expected type, use
1f6616ee 4875 valid_stringptr_type_p (), check that the format string types are
4876 consistent with the format specification.
4877 (decode_format_attr): Warn if NSString is used outside objective-c.
4878 (format_types_orig): Add NSString.
4879 (format_name): New.
4880 (format_flags): New.
4881 (check_format_arg): Handle format strings requiring an external parser.
4882 first_target_format_type: New variable.
4883 (handle_format_attribute): Set up first_target_format_type, pass the
4884 expected format arg string type to check_format_string().
4885 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
4886 * stub-objc.c (objc_string_ref_type_p): New.
4887 (objc_check_format_arg): New.
4888
b0d0931f 48892010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
4890
19931eea 4891 Fixed using the Objective-C 2.0 dot-syntax with class names.
b0d0931f 4892 * c-common.h (objc_build_class_component_ref): New.
4893 * stub-objc.c (objc_build_class_component_ref): New.
4894
f26877d5 48952010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
4896
4897 * c.opt (Wproperty-assign-default): New option.
4898
1ef143b6 48992010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
4900
4901 Implemented -fobjc-std=objc1 flag.
4902 * c.opt (fobjc-std=objc1): New option.
4903
8c582e4f 49042010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
4905
4906 Implemented format and noreturn attributes for Objective-C methods.
4907 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
4908 attribute for Objective-C methods.
4909
8637f1db 49102010-10-31 Jason Merrill <jason@redhat.com>
4911
4912 * c-common.c (conversion_warning, warn_for_collisions_1): Use
4913 EXPR_LOC_OR_HERE.
4914
9d9f5bb3 49152010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
4916
4917 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
4918 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
4919 (objc_add_property_declaration): Removed arguments for copies and
4920 ivar.
4921 (objc_build_getter_call): Renamed to
4922 objc_maybe_build_component_ref.
4923 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
4924 (objc_is_property_ref): New.
4925 * c-common.c (c_common_reswords): Removed copies and ivar.
4926 * stub-objc.c (objc_add_property_declaration): Removed arguments
4927 for copies and ivar.
4928 (objc_build_getter_call): Renamed to
4929 objc_maybe_build_component_ref.
4930 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
4931 (objc_is_property_ref): New.
19931eea 4932
56f907a0 49332010-10-29 Arnaud Charlet <charlet@adacore.com>
4934 Matthew Gingell <gingell@adacore.com>
4935
4936 * c-ada-spec.c (separate_class_package): New function.
4937 (pp_ada_tree_identifier): Prefix references to C++ classes with the
4938 name of their enclosing package.
4939 (print_ada_declaration): Use separate_class_package.
4940
b5fa273e 49412010-10-27 Jason Merrill <jason@redhat.com>
4942
5290e253 4943 * c-common.c (c_common_reswords): Add __is_literal_type.
4944 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
4945
b5fa273e 4946 * c-common.c (check_case_value): Remove special C++ code.
4947
7590f0e5 49482010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
4949
4950 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
4951 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
4952 and RID_LAST_PATTR.
4953 (objc_add_property_declaration): Added additional arguments.
4954 (objc_property_attribute_kind): Removed.
4955 (objc_set_property_attr): Removed.
4956 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
4957 copy and nonatomic.
4958 * stub-objc.c (objc_add_property_declaration): Added additional
4959 arguments.
4960 (objc_set_property_attr): Removed.
19931eea 4961
1d894bcf 49622010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
4963
4964 * c-common.h (objc_add_property_variable): Renamed to
4965 objc_add_property_declaration. Added location argument.
4966 * stub-objc.c (objc_add_property_variable): Same change.
8204c077 4967
e23bf1fb 49682010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
4969
4970 * c-common.h (objc_maybe_printable_name): New.
4971 * stub-objc.c (objc_maybe_printable_name): New.
4972
93426222 49732010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
4974 Andrew Pinski <pinskia@gmail.com>
4975
4976 * c-common.h (c_common_mark_addressable_vec): Declare.
4977 * c-common.c (c_common_mark_addressable_vec): New function.
4978
45b2b110 49792010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
4980
4981 * c-common.h (objc_set_method_type): Removed.
4982 (objc_add_method_declaration): Added boolean argument.
4983 (objc_start_method_definition): Same change.
4984 (objc_build_method_signature): Same change.
4985 * stub-objc.c (objc_set_method_type): Removed.
4986 (objc_add_method_declaration): Added boolean argument.
4987 (objc_start_method_definition): Same change.
4988 (objc_build_method_signature): Same change.
4989
64cd9619 49902010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
4991
4992 * c-common.h (finish_file): Removed.
4993 (objc_write_global_declarations): New.
4994 * c-opts.c (c_common_parse_file): Do not call finish_file.
4995 * stub-objc.c (objc_write_global_declarations): New.
19931eea 4996
e1f293c0 49972010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
4998
4999 Implemented parsing @synthesize and @dynamic for
5000 Objective-C/Objective-C++.
5001 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
5002 (objc_add_synthesize_declaration): New.
5003 (objc_add_dynamic_declaration): New.
5004 * c-common.c (c_common_reswords): Add synthesize and dynamic.
5005 * stub-objc.c (objc_add_synthesize_declaration): New.
5006 (objc_add_dynamic_declaration): New.
19931eea 5007
ef97a312 50082010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
5009
5010 PR target/46041
5011 * c-cppbuiltin.c (mode_has_fma): Move function here from
5012 builtins.c. Don't use the fma optab, instead just use the
5013 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
5014 using -save-temps.
5015
69b07042 50162010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
5017
5018 Merge from 'apple/trunk' branch on FSF servers.
ef97a312 5019
69b07042 5020 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
5021
19931eea 5022 Radar 4330422
69b07042 5023 * c-common.h (objc_non_volatilized_type): New declaration
5024 * stub-objc.c (objc_non_volatilized_type): New stub.
5025
f15f2e56 50262010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
5027
69b07042 5028 Merge from 'apple/trunk' branch on FSF servers.
f15f2e56 5029
5030 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
5031
19931eea 5032 Radar 4133425
f15f2e56 5033 * c-common.h (objc_diagnose_private_ivar): New decl.
ef97a312 5034 * stub-objc.c (objc_diagnose_private_ivar): New stub.
f15f2e56 5035
4a8875ed 50362010-10-17 Iain Sandoe <iains@gcc.gnu.org>
5037
5038 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
5039 * c-common.h (enum rid): Add RID_AT_PACKAGE.
5040 (objc_ivar_visibility_kind): New enum.
5041 (objc_set_visibility): Adjust prototype to use visibility enum.
ef97a312 5042 * stub-objc.c (objc_set_visibility): Adjust stub to use
4a8875ed 5043 visibility enum.
5044
7e0713b1 50452010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
5046
5047 * c-cppbuiltin.c (builtin_define_float_constants): Emit
5048 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
5049 has the appropriate fma builtins.
5050 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
5051
86c110ac 50522010-10-14 Iain Sandoe <iains@gcc.gnu.org>
5053
7e0713b1 5054 merge from FSF apple 'trunk' branch.
86c110ac 5055 2006 Fariborz Jahanian <fjahanian@apple.com>
7e0713b1 5056
86c110ac 5057 Radars 4436866, 4505126, 4506903, 4517826
5058 * c-common.c (c_common_resword): Define @property and its attributes.
5059 * c-common.h: Define property attribute enum entries.
5060 (OBJC_IS_PATTR_KEYWORD): New.
5061 (objc_property_attribute_kind): New enum.
5062 Declare objc_set_property_attr (), objc_add_property_variable (),
5063 objc_build_getter_call () and objc_build_setter_call ().
5064 * stub-objc.c (objc_set_property_attr): New stub.
5065 (objc_add_property_variable): Likewise.
5066 (objc_build_getter_call): Likewise.
5067 (objc_build_setter_call) Likewise.
7e0713b1 5068
40c8d1dd 50692010-10-13 Iain Sandoe <iains@gcc.gnu.org>
5070
7e0713b1 5071 merge from FSF apple 'trunk' branch.
40c8d1dd 5072 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
5073
5074 Radar 3803157 (method attributes)
5075 * c-common.c (handle_deprecated_attribute): Recognize
5076 objc methods as valid declarations.
5077 * c-common.h: Declare objc_method_decl ().
7e0713b1 5078 * stub-objc.c (objc_method_decl): New stub.
40c8d1dd 5079
f3f006ad 50802010-10-08 Joseph Myers <joseph@codesourcery.com>
5081
5082 * c-common.c (parse_optimize_options): Call
5083 decode_cmdline_options_to_array_default_mask before
5084 decode_options. Update arguments to decode_options.
5085 * c-common.h (c_common_init_options_struct): Declare.
5086 * c-opts.c (c_common_init_options_struct): New. Split out from
5087 c_common_init_options.
5088
0a65c3bb 50892010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
5090
5091 Implemented fast enumeration for Objective-C.
5092 * c-common.h (objc_finish_foreach_loop): New.
5093 * stub-objc.c (objc_finish_foreach_loop): New.
5094
24ca3b4e 50952010-10-05 Joseph Myers <joseph@codesourcery.com>
5096
5097 * c-common.h (struct diagnostic_context): Don't declare here.
5098 (c_common_initialize_diagnostics): Declare using
5099 diagnostic_context typedef.
5100 * c-opts.c (c_common_handle_option): Pass global_dc to
5101 handle_generated_option.
5102
f83b64ca 51032010-10-04 Joseph Myers <joseph@codesourcery.com>
5104
5105 * c-opts.c (c_common_handle_option): Pass &global_options_set to
5106 handle_generated_option.
5107
2fdec027 51082010-10-03 Ian Lance Taylor <iant@google.com>
5109
5110 * c.opt (-fplan9-extensions): New option.
5111
41acdfa4 51122010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5113
5114 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
5115 Remove.
5116 (c_cpp_builtins): Call functions from cppbuiltin.c instead
5117 of duplicating code.
5118
069761fb 51192010-09-30 Iain Sandoe <iains@gcc.gnu.org>
5120
5121 * c-common.c: Add two new entries for @optional
5122 and @required keywords.
5123
5124 merge from FSF 'apple/trunk' branch.
5125 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
5126
5127 Radar 4386773
5128 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
5129 objective-c keywords.
5130 (objc_set_method_opt): New declaration.
5131 * stub-objc.c (objc_set_method_opt): New stub.
19931eea 5132
2c5d2e39 51332010-09-30 Joseph Myers <joseph@codesourcery.com>
5134
5135 * c-common.c (handle_optimize_attribute): Pass &global_options to
5136 cl_optimization_save and cl_optimization_restore.
5137 * c-opts.c (c_common_handle_option): Pass &global_options to
5138 handle_generated_option.
5139 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
5140 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
5141 &global_options to cl_optimization_restore.
5142
e5c75ac3 51432010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
5144
5145 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
5146 Objective-C/Objective-C++ keywords.
5147
3511333e 51482010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
e147d6aa 5149
19931eea 5150 Merge from 'apple/trunk' branch on FSF servers.
5151
e147d6aa 5152 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
5153
5154 Radar 4281748
5155 * c-common.h (objc_check_global_decl): New declaration.
5156 * stub-objc.c (objc_check_global_decl): New stub.
5157
5461e683 51582010-09-29 Joseph Myers <joseph@codesourcery.com>
5159
5160 * c.opt: Don't use VarExists.
5161
5ae82d58 51622010-09-29 Joseph Myers <joseph@codesourcery.com>
5163
5164 * c-common.c (c_cpp_error): Update names of diagnostic_context
5165 members.
5166 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
5167 cl_optimization members.
5168 * c-opts.c (warning_as_error_callback, c_common_handle_option,
5169 sanitize_cpp_opts, finish_options): Update names of cpp_options
5170 members.
5171
b27e241e 51722010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
5173
5174 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
5175 (objc_is_reserved_word): Removed.
5176 * c-common.c: Updated comments.
5177 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
5178 objc_is_reserved_word.
5179 * stub-objc.c (objc_is_reserved_word): Removed.
5180
03fc2271 51812010-09-28 Iain Sandoe <iains@gcc.gnu.org>
5182
19931eea 5183 * c-common.h (objc_add_method_declaration): Adjust prototype to
03fc2271 5184 include attributes.
5185 (objc_start_method_definition): Likewise.
5186 (objc_build_keyword_decl): Likewise.
5187 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
5188 (objc_start_method_definition): Likewise.
5189 (objc_build_keyword_decl): Likewise.
5190
a336eb4b 51912010-09-28 Iain Sandoe <iains@gcc.gnu.org>
5192
5193 * c-common.h (objc_start_class_interface): Adjust prototype.
5194 (objc_start_category_interface): Likewise.
5195 (objc_start_protocol): Likewise.
5196 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
5197 (objc_start_class_interface): Likewise.
5198 (objc_start_category_interface): Likewise.
5199
48b14f50 52002010-09-27 Ian Lance Taylor <iant@google.com>
5201
5202 * c-common.c (c_common_attribute_table): Add no_split_stack.
5203 (handle_no_split_stack_attribute): New static function.
5204
4abfc532 52052010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
5206
19931eea 5207 Merge from 'apple/trunk' branch on FSF servers.
4abfc532 5208
5209 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
5210
19931eea 5211 Radar 4229905
4abfc532 5212 * c-common.h (objc_have_common_type): New declaration.
5213 * stub-objc.c (objc_have_common_type): New stub.
5214
5215 2005-06-22 Ziemowit Laski <zlaski@apple.com>
5216
5217 Radar 4154928
5218 * c-common.h (objc_common_type): New prototype.
19931eea 5219 * stub-objc.c (objc_common_type): New stub.
4abfc532 5220
7bd95dfd 52212010-09-24 Jan Hubicka <jh@suse.cz>
5222
5223 * c-common.c (handle_leaf_attribute): New function.
5224 (struct attribute_spec c_common_att): Add leaf.
5225
5789e05b 52262010-09-22 Joseph Myers <joseph@codesourcery.com>
5227
5228 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
5229 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
5230 -dump, -dump=, -imacros, -imacros=, -include, -include=,
5231 -include-barrier, -include-directory, -include-directory=,
5232 -include-directory-after, -include-directory-after=,
5233 -include-prefix, -include-prefix=, -include-with-prefix,
5234 -include-with-prefix=, -include-with-prefix-after,
5235 -include-with-prefix-after=, -include-with-prefix-before,
5236 -include-with-prefix-before=, -no-integrated-cpp,
5237 -no-line-commands, -no-standard-includes, -no-warnings, -output,
5238 -output=, -pedantic, -pedantic-errors, -preprocess,
5239 -print-missing-file-dependencies, -trace-includes, -traditional,
5240 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
5241 -user-dependencies, -verbose, -write-dependencies,
5242 -write-user-dependencies, no-integrated-cpp, traditional): New.
5243
e6fb54ba 52442010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
5245
5246 PR objc/23710
9b60f3b0 5247 * c-common.h (objc_start_method_definition): Return bool instead
5248 of void.
5249 * stub-objc.c (objc_start_method_definition): Return bool instead
5250 of void.
5251
52522010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
5253
5254 PR objc/25965
5255 * c-common.h (objc_get_interface_ivars): New declaration.
5256 * stub-objc.c (objc_get_interface_ivars): New stub.
e6fb54ba 5257
e44b0a1f 52582010-09-15 Ian Lance Taylor <iant@google.com>
5259
5260 * c-common.c (parse_optimize_options): Do not capitalize warning
ebd7c4c1 5261 messages. Remove period at end of warning message.
e44b0a1f 5262
85c0a25c 52632010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5264
5265 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
5266 (handle_alias_attribute): ... here.
5267 (handle_ifunc_attribute): New.
5268
5ba33bf4 52692010-09-06 Mark Mitchell <mark@codesourcery.com>
5270
5271 * c-common.h (do_warn_double_promotion): Declare.
5272 * c-common.c (do_warn_double_promotion): Define.
5273
c920faa3 52742010-09-05 Mark Mitchell <mark@codesourcery.com>
5275
5276 * c.opt (Wdouble-promotion): New.
5277
9604e070 52782010-09-02 Joseph Myers <joseph@codesourcery.com>
5279
5280 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
5281 fvtable-thunks, fxref): Mark no longer supported in help text.
5282
3b0273a1 52832010-09-02 Joseph Myers <joseph@codesourcery.com>
5284
5285 * c.opt (Wimport, fall-virtual, falt-external-templates,
5286 fdefault-inline, fenum-int-equiv, fexternal-templates,
5287 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
5288 fname-mangling-version-, fnew-abi, fnonnull-objects,
5289 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
5290 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
5291 applicable.
5292 (fhandle-exceptions): Mark with Alias and Warn.
5293 * c-opts.c (c_common_handle_option): Don't handle options marked
5294 as ignored.
5295
67089c6b 52962010-09-02 Joseph Myers <joseph@codesourcery.com>
5297
5298 * c.opt (Wcomments, Werror-implicit-function-declaration,
5299 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
5300 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
5301 aliases.
5302 * c-common.c (option_codes): Use OPT_Wcomment instead of
5303 OPT_Wcomments.
5304 * c-opts.c (warning_as_error_callback, c_common_handle_option):
5305 Don't handle options marked as aliases.
5306
2af087f2 53072010-08-25 Richard Guenther <rguenther@suse.de>
5308
5309 * c-common.c (c_common_get_alias_set): Remove special
5310 handling for pointers.
5311
48148244 53122010-08-20 Nathan Froyd <froydnj@codesourcery.com>
5313
5314 * c-common.c: Use FOR_EACH_VEC_ELT.
5315 * c-gimplify.c: Likewise.
5316 * c-pragma.c: Likewise.
5317
89c69892 53182010-08-16 Joseph Myers <joseph@codesourcery.com>
5319
5320 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
5321 RejectDriver.
5322 (MMDX): Change back to MMD. Mark NoDriverArg instead of
5323 RejectDriver.
5324 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
5325 instead of OPT_MDX and OPT_MMDX.
5326
e28aa114 53272010-08-16 Joseph Myers <joseph@codesourcery.com>
5328
5329 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
5330
99b66d21 53312010-08-12 Joseph Myers <joseph@codesourcery.com>
5332
5333 * c.opt (MD, MMD): Change to MDX and MMDX.
5334 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
5335
666f4bf0 53362010-08-11 Joseph Myers <joseph@codesourcery.com>
5337
5338 * c-opts.c (c_common_handle_option): Call handle_generated_option
5339 instead of handle_option.
5340
5ec815f6 53412010-08-08 Nathan Froyd <froydnj@codesourcery.com>
5342
5343 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
5344 (maybe_apply_renaming_pragma): Delete unneeded declarations.
5345
d13143cf 53462010-08-08 Nathan Froyd <froydnj@codesourcery.com>
5347
5348 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
5349 (pending_redefine_extname): Change type to a VEC.
5350 (add_to_renaming_pragma_list): Update for new type of
5351 pending_redefine_extname.
5ec815f6 5352 (maybe_apply_renaming_pragma): Likewise.
d13143cf 5353
2008c983 53542010-08-04 Arnaud Charlet <charlet@adacore.com>
5355
5356 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
5357 visited.
5358 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
5359 decide whether a type has already been declared/seen.
5360 Do not go to the original type.
5361 (dump_nested_types): New parameter forward.
5362 Generate forward declaration if needed and mark type as visited.
5363 (print_ada_declaration): Call dump_nested_types if not already done.
5364 Mark types as visited.
5365
9b091a73 53662010-08-03 Joseph Myers <joseph@codesourcery.com>
5367
5368 * c.opt (-print-pch-checksum): Remove option.
5369 * c-opts.c (c_common_handle_option): Don't handle
5370 OPT_print_pch_checksum.
5371
b78351e5 53722010-07-27 Joseph Myers <joseph@codesourcery.com>
5373
5374 * c-common.h (c_common_handle_option): Update prototype and return
5375 value type.
5376 * c-opts.c (c_common_handle_option): Update prototype and return
5377 value type. Update calls to handle_option and
5378 enable_warning_as_error.
5379
34416a90 53802010-07-27 Jakub Jelinek <jakub@redhat.com>
5381
5382 PR c/45079
5383 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
5384
fecf9011 53852010-07-27 Joseph Myers <joseph@codesourcery.com>
5386
5387 * c-common.h (c_common_missing_argument): Remove.
5388 * c-opts.c (c_common_missing_argument): Remove.
5389 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
5390 idirafter, imacros, include, isysroot, isystem, iquote): Add
5391 MissingArgError.
5392 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
5393
e88d34f6 53942010-07-27 Joseph Myers <joseph@codesourcery.com>
5395
5396 * c-common.h (c_common_option_lang_mask,
5397 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
5398 New.
5399 (c_common_init_options): Update prototype.
5400 * c-opts.c (c_common_option_lang_mask): New.
5401 (c_common_initialize_diagnostics): Split out of
5402 c_common_init_options.
5403 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
5404 New.
5405 (c_common_init_options): Update prototype. Use decoded options in
5406 search for -lang-asm.
5407
1767a056 54082010-07-15 Nathan Froyd <froydnj@codesourcery.com>
5409
5410 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
5411 * c-format.c: Likewise.
5412
0b205f4c 54132010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
5414
5415 * c-common.h: Include diagnostic-core.h. Error if already
5416 included.
5417 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
5418
1c58e3f1 54192010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
5420
1f78217c 5421 * c-common.c (IN_GCC_FRONTEND): Do not undef.
1c58e3f1 5422 Do not include expr.h
5423 (vector_mode_valid_p): Move here.
5424
33cc157c 54252010-06-21 DJ Delorie <dj@redhat.com>
5426
5427 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
5428 allow these pragmas anywhere.
5429
54302010-06-14 Jakub Jelinek <jakub@redhat.com>
5431
5432 PR bootstrap/44509
5433 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
5434 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
5435 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
5436 ggc_strdup instead of xstrdup.
5437
54382010-06-10 Jakub Jelinek <jakub@redhat.com>
5439
5440 * c-cppbuiltin.c: Include cpp-id-data.h.
5441 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
5442 (lazy_hex_fp_value): New function.
5443 (builtin_define_with_hex_fp_value): Provide definitions lazily.
5444
9b40bfbf 54452010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
5446
5447 * c-gimplify.c: Do not include tree-flow.h
5448
202d6e5f 54492010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
5450
5451 PR other/44034
5452 * c-common.c: Rename targetm member:
5453 targetm.enum_va_list -> targetm.enum_va_list_p
5454
d3237426 54552010-06-28 Anatoly Sokolov <aesok@post.ru>
5456
5457 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
5458
596981c8 54592010-06-28 Steven Bosscher <steven@gcc.gnu.org>
5460
5461 * c-cppbuiltin.c: Do not include except.h.
5462
b9bdfa0b 54632010-06-24 Andi Kleen <ak@linux.intel.com>
5464
19931eea 5465 * c-common.c (warn_for_omitted_condop): New.
5466 * c-common.h (warn_for_omitted_condop): Add prototype.
b9bdfa0b 5467
55ad092d 54682010-06-21 Joseph Myers <joseph@codesourcery.com>
5469
5470 * c.opt (lang-objc): Remove.
5471 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
5472
9e7c2572 54732010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
5474
5475 * c-opts.c: Include "tm_p.h".
5476
615ef0bb 54772010-06-20 Joseph Myers <joseph@codesourcery.com>
5478
5479 * c-common.c (parse_optimize_options): Update call to
5480 decode_options.
5481
aef48c9a 54822010-06-18 Nathan Froyd <froydnj@codesourcery.com>
5483
5484 * c-common.c (record_types_used_by_current_var_decl): Adjust for
5485 new type of types_used_by_cur_var_decl.
5486
d74003b4 54872010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
5488
5489 PR bootstrap/44512
5490 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
5491 for C++ standard compliance.
5492
1194d077 54932010-06-16 Jason Merrill <jason@redhat.com>
5494
5495 * c.opt: Add -Wnoexcept.
5496
d473d901 54972010-06-16 Richard Guenther <rguenther@suse.de>
5498
5499 PR c/44555
5500 * c-common.c (c_common_truthvalue_conversion): Remove
5501 premature and wrong optimization concering ADDR_EXPRs.
5502
b62dbfd3 55032010-06-15 Arnaud Charlet <charlet@adacore.com>
5504
5505 * c-ada-spec.c (dump_sloc): Remove column info.
5506 (is_simple_enum): New function.
5507 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
5508 enum types when relevant.
5509
200dd99c 55102010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
5511
19931eea 5512 * c-common.c (conversion_warning): Warn at expression
200dd99c 5513 location.
5514
abf6a617 55152010-06-10 Joseph Myers <joseph@codesourcery.com>
5516
5517 * c-opts.c (c_common_handle_option): Don't handle
5518 OPT_fshow_column.
5519
ba72912a 55202010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
5521
5522 * c-pragma.c (push_alignment): Use typed GC allocation.
5523 (handle_pragma_push_options): Likewise.
5524
5525 * c-common.c (parse_optimize_options): Likewise.
5526
5527 * c-common.h (struct sorted_fields_type): Add variable_size GTY
5528 option.
5529
4aafe913 55302010-06-07 Joseph Myers <joseph@codesourcery.com>
5531
5532 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
5533 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
5534 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
5535 flag_signed_bitfields, warn_strict_null_sentinel,
5536 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
5537 flag_gen_declaration, flag_no_gnu_keywords,
5538 flag_implement_inlines, flag_implicit_templates,
5539 flag_implicit_inline_templates, flag_optional_diags,
5540 flag_elide_constructors, flag_default_inline, flag_rtti,
5541 flag_conserve_space, flag_access_control, flag_check_new,
5542 flag_new_for_scope, flag_weak, flag_working_directory,
5543 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
5544 flag_enforce_eh_specs, flag_threadsafe_statics,
5545 flag_pretty_templates): Remove.
5546 * c-common.h (flag_preprocess_only, flag_nil_receivers,
5547 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
5548 flag_replace_objc_classes, flag_undef, flag_no_builtin,
5549 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
5550 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
5551 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
5552 flag_no_gnu_keywords, flag_implement_inlines,
5553 flag_implicit_templates, flag_implicit_inline_templates,
5554 flag_optional_diags, flag_elide_constructors, flag_default_inline,
5555 flag_rtti, flag_conserve_space, flag_access_control,
5556 flag_check_new, flag_new_for_scope, flag_weak,
5557 flag_working_directory, flag_use_cxa_atexit,
5558 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
5559 flag_threadsafe_statics, flag_pretty_templates,
5560 warn_strict_null_sentinel): Remove.
5561 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
5562 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
5563 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
5564 fimplicit-inline-templates, fimplicit-templates,
5565 flax-vector-conversions, fms-extensions, fnil-receivers,
5566 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
5567 frtti, fshort-double, fshort-enums, fshort-wchar,
5568 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
5569 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
5570 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
5571 gen-decls, undef): Use Var.
5572 (fdefault-inline, foptional-diags): Document as doing nothing.
5573 * c-opts.c (c_common_handle_option): Remove cases for options now
5574 using Var. Mark ignored options as such.
5575
7bedc3a0 55762010-06-05 Steven Bosscher <steven@gcc.gnu.org>
5577
19931eea 5578 * c-common.c: Moved to here from parent directory.
7bedc3a0 5579 * c-common.def: Likewise.
5580 * c-common.h: Likewise.
5581 * c-cppbuiltin.c: Likewise.
5582 * c-dump.c: Likewise.
5583 * c-format.c: Likewise.
5584 * c-format.h : Likewise.
5585 * c-gimplify.c: Likewise.
5586 * c-lex.c: Likewise.
5587 * c-omp.c: Likewise.
5588 * c.opt: Likewise.
5589 * c-opts.c: Likewise.
5590 * c-pch.c: Likewise.
5591 * c-ppoutput.c: Likewise.
5592 * c-pragma.c: Likewise.
5593 * c-pragma.h: Likewise.
5594 * c-pretty-print.c: Likewise.
5595 * c-pretty-print.h: Likewise.
5596 * c-semantics.c: Likewise.
5597 * stub-objc.c: Likewise.
5598
5599 * c-common.c: Include gt-c-family-c-common.h.
5600 * c-pragma.c: Include gt-c-family-c-pragma.h.
5601\f
d353bf18 5602Copyright (C) 2010-2015 Free Software Foundation, Inc.
7bedc3a0 5603
5604Copying and distribution of this file, with or without modification,
5605are permitted in any medium without royalty provided the copyright
5606notice and this notice are preserved.